I've seen experienced programmers failing at learning Haskell for the same reason experienced programmers fail at learning Vim, the initial learning curve is very steep, and they don't see the value on climbing that wall. Now, if you know Vim, ask yourself, was it worth it? I'm convinced 99% of people would say yes. It is the same with Haskell, all those seemingly complex concepts come with a big reward.
Learning Haskell is easier with a strong functional programming background; sadly CS students don't learn much about FP, so having lots of experience in CS and compilers won't necessarily put you in a better position than somebody who has no formal background in CS but lots of programming experience.
A math background on the other hand should help you. Learn about how category theory is applied in Haskell, and you're already half way there. Monads are just a piece of the puzzle.
I do agree with your last three points. I haven't used Haskell in production, so my experience in "real world Haskell" is limited, but it has helped me immensely in my daily work with other languages. Haskell forever changes the way you think and approach problems, just like Vim changes the way you write and edit code; it will make you a better programmer.
> the same reason experienced programmers fail at learning Vim, the initial learning curve is very steep, and they don't see the value on climbing that wall.
This is definitely me. I only got really into Linux with Debian-like systems after Nano became those distributions' standard editor. I know the bare minimum about vim for occasional, minimal editing of configuration files. I only ever use it when I'm stuck with a rescue prompt or some third-rate distro that has nothing else. Usually one of my first goals is to get either a GUI, or file transfer capability, or a package manager up and running; then I stop using it.
"I only got really into Linux with Debian-like systems after Nano became those distributions' standard editor."
I'd recommend learning an editor that has any sort of power - vim, emacs, or something lesser known. Trying to get anything done in nano is like pulling teeth. Yeesh.
Vim is multi-platform, and there are GUIs for Vim, particularly GVim and Macvim, where you can use the mouse, and copy/paste, etc, just have to do it the Vim way. You gave up too early, Nano isn't even close; it's like comparing Notepad to Notepad++. Give both Haskell and Vim another chance.
The problem with PHP is its design, or lack of it to be precise. It's inconsistent and quite verbose. But it's made for the web, so it's very easy to deploy, and the workflow is straightforward, put file in a folder on a server and refresh the page. If you're new to web development but already have some programming experience, PHP is a good language to learn because it's ubiquitous and very easy to get started. If you're new to programming, I'd suggest you learn Python first; it's a beautifully designed general purpose language, and will guide you through the right path before diving into the PHP jungle.
Yes I am very much interested in learning Ruby/RoR and Python too. I had a brief look over the both of them, and my first impression was their syntax is very simple and easy to learn too, compared to the objective C, which literally gave me a heart attack ;)
Perhaps, I have not developed a lengthy web application myself yet, therefore I can not determine the inefficiencies of PHP over RoR or Python. And this was the reason I posted it here, to see, How PHP can be troublesome in complex web applications and how RoR or Python handle them more efficiently.
PHP can handle as well or better than Python and Ruby. The performance difference is not that important when choosing between these languages, because they are all slow anyway. If you compare PHP vs Java or Ruby vs NodeJS, then performance gain might be an important factor when choosing. Python is used more outside of webdev than PHP and Ruby, so that might be something to consider, because there are more libraries for making UIs, games, graphics, etc.
It looks promising, I highly dislike writing PHP and this seems like it might ease the pain, but they could've gotten rid of the damn dollar sign in front of variables, how ugly is this? "return ($y) ==> { return $y + 1; }"
Edit: My previous comment was referring to the second occurrence of "return" in your example (after the "==>" arrow). Just noticed I mistakenly dropped the first occurrence of "return"; the first occurrence of "return" in your example is needed.
Yes, maybe, in the same way I would browse for random stuff on other places out of pure boredom, there are some interesting polls. But the site is too slow, it takes ~5sec to load, on my desktop, and the scrolling isn't smooth. Loading 50 jQuery libraries in the header plus some other 30 libraries in the footer don't help, it's killing the site... You need to concatenate and minify all that code, same with the CSS. And do some profiling. Ebay, arguably one of the biggest sites on the internet runs on ~80mb but your site uses up 130mb; you might have a memory leak.
They are loading like 20 jQuery libraries in the header. Nothing is minified. By looking at the JS code here http://assets.razerzone.com/eeimages/products/15348/js/templ..., it seems like they vomited jQuery on top of a PSD2HTML site. Bad indentation, bad class names like ".bar-prc1", ".bar-prc2", ".bar-prc3", no selector caching, no consitent usage of chaining, inconsistent style overall, in other words, a mess.
Not sure those two cases are really interchangeable. It doesn't seem like a very good example. By introducing an object that way you're coupling your functions that work on pure data to an instance. Now to multiply two numbers you need an instance of Calc. I'd suggest something like this instead:
var multiply = curry(function(x, y){
return x * y;
});
var add = curry(function(x, y){
return x + y;
});
var Calc = (function(){
function Calc(x){
this.x = x;
}
Calc.prototype.map = function(f){
this.x = f(this.x);
return this;
};
return Calc;
}());
new Calc(2).map(compose(add(2), multiply(4)));
// or
new Calc(2).map(multiply(4)).map(add(2));
Learning Haskell is easier with a strong functional programming background; sadly CS students don't learn much about FP, so having lots of experience in CS and compilers won't necessarily put you in a better position than somebody who has no formal background in CS but lots of programming experience.
A math background on the other hand should help you. Learn about how category theory is applied in Haskell, and you're already half way there. Monads are just a piece of the puzzle.
I do agree with your last three points. I haven't used Haskell in production, so my experience in "real world Haskell" is limited, but it has helped me immensely in my daily work with other languages. Haskell forever changes the way you think and approach problems, just like Vim changes the way you write and edit code; it will make you a better programmer.