NaN is not equal to NaN by the IEEE 754 standard. JavaScript, and many other modern languages, implement floating point numbers by this standard. E.g. in C#:
> I think that saying you can 'learn Haskell in a week' is really short sighted. You can learn to parse a Haskell program and write a guess-the-number program in a week, but learning how to write good Haskell is going to take months, if not years.
That was exactly my point, sorry if it wasn't clear.
> Really learning Haskell as an experienced programmer took as long as it took to learn Python as a novice, and I've heard similar reports from other people. I certainly agree that if you know, say, Java, learning C# probably isn't going to maximize your 'skill increase per time'. But saying that going from Java to Haskell, or even farther to something super-weird like Agda or Forth or Prolog, is just as easy as going from Java to C# is just wrong.
I am not saying that the "Java after C#" learning curve is the same as "Haskell after C#". It isn't. But I believe that the general experience of abstract thinking that one learns in many years must give an advantage over a novice learner. I am not talking about a script-kiddie who spent five years hacking code, or somebody who has the same one year experience 20 times instead of real 20 year experience. I believe that if you spent your development life actively then you must get a new concept easier than a beginner. And not only that. Concepts of a paradigm or language leak into others. Linq in .Net leverages "monads". Eric Meijer, one of the creators of Linq, loves Haskell and they borrowed ideas from Haskell. Now, if one is a "too pragmatic" programmer, they can use Linq for years successfully and never get closer to understand monads. However is one takes the time and looks behind the curtains, they got closer to understand at least this one concept of Haskell. And I am pretty sure that over let's say 10 years you are exposed to many ideas in some way if you keep your eyes open.
As I said, my gut feeling (can't tell how good the estimation is) is that in about six months I "get Haskell and fp". But it's not black or white: obviously spending 6 more years in the fp world would make a difference. There must be a decision made (and here I agree with gfodor) when the further gain doesn't justify the investment. I won't stop at 6th month if I don't feel the power yet :)
Very pragmatic approach. C# if you are ok with the Microsoft stack, or F# if you are a bit more advantageous and serious about the "new way of thinking". Python is also a great investment to solve real-world problems. And don't forget JavaScript. It is not just a browser language any more: there is node.js for the server side and it is the common language of most mobile frameworks that are multi-platform targeted.
You cannot go wrong with any of these. So have a look at code samples and spend some time browsing the web-sites about all of them then choose the one that appeals the most to you.
I agree with you that it is everybody's own decision :) Although from a slightly philosophical point of view: how can one determine what levels are beyond their own knowledge, let alone what amount of effort it would take for them to get there and if it would worth it to do so. An experienced developer can tell a beginner what they could/should learn next to step up, but how do you determine the same for yourself?
On the other hand I strongly dislike the "in minimal time" condition. After let's say 10 years or more in programming (that's me in this case) and you say that the next step one could achieve is something that comes faster than learning a new programming paradigm? My gut feeling is that it will take me about 6 months with a strong programming background. I am not talking about learning Haskell (What could it be: a week or so?) but about understanding FP, knowing (and feeling) the fp design patterns. Depending on the investment in 6 months one probably can achieve that the application of those patterns come as second nature. That's my goal. Two questions:
1) What would give greater and longer-term benefits than that? Learning Reactive Extensions? Yet another ORM framework? Node.js? Those are only tools. One can learn them in some days when a project requires it.
2) What is the rush for? Do you remember the time you learnt OO programming? I would say to learn it properly, in the beginning of your career as most of us do it, required much more effort than to learn Haskell and FP when you are already an experienced programmer. Wasn't it worth to spend all that time to learn OO principles, design-patterns, tools, languages? And if you were stuck in the OO world throughout your career, then I am pretty sure that learning FP principles, patterns and language(s) have about the same effect on your future than OO had on your present expertise.
I am looking forward to that experience :) Besides the technical reasons (nice syntax, pure fp, strong typing, ...) I chose Haskell to learn functional programming because it has a very good community and documentation. It's like the entire Haskell ecosystem's been built to teach FP. Actually that was kind of the intention when Haskell was born as far as I know.
You have more experience here thanks for correcting me :) What I meant was that they are not two very different worlds. I myself picked Haskell over Lisp hoping to gain the benefits that I would get from Lisp but with some advantages.
Would you also recommend the other way around? Learning Lisp after Haskell? I don't mean the syntactical differences or the real-world usage. Solely the "way of thinking".
You have Lisp knowledge, so maybe Haskell is not the best candidate for "a new way you think". Given your background I would say you probably would enjoy Scala more than Java (targeting the same JVM). I am not sure if one can learn enough from Smalltalk to justify the effort it takes to learn an in-practice useless language. If you don't speak JavaScript yet, that's a good candidate, especially if you use your FP experience in it and not just go the OO way most people do.
I friend recommended Elixir to me, but I would rather learn Erlang properly. Erlang has a small community already, why to learn a language targeting Erlang VM that has even smaller community and much less documentation?
> 0.0/0.0 == Double.NaN
false