News for hackers. Stuff that matters.
Re:Microsoft takes .NET open source and cross-platform by rastapasta42 on Wednesday November 12, 2014 @04:17PM (#8598236)
Clearly you have no idea what you're talking about. I suggest first learning the language before spreading FUD about it.

Separation of pure and unpure components greatly simplifies the reasoning about the problem domain. Traditional imperative programs are often full of subtle bugs because calling a procedure can have arbitrary effect on your system. For example calling function with the same arguments can return different values based on arbitrary hard-to-track reasons (such as your OS's scheduler). It's just too much details to keep in your head.

But in Haskell pure functions are guaranteed to have same result with same input. It enables the programmer to create logically isolated blocks without messy interdependencies.

It's especially helpful for concurrent programming by freeing you from all the non-deterministic spaghetti.

Haskell has a steep learning curve, but it'll make you a better programmer in the long run.

Re:Microsoft takes .NET open source and cross-platform by nbevans on Wednesday November 12, 2014 @08:01PM (#8599378)
"But in Haskell pure functions are guaranteed to have same result with same input." I'm pretty sure that same law applies to a pure function in any language, not just Haskell. #shitthatHNsays
Re:Microsoft takes .NET open source and cross-platform by codygman on Wednesday November 12, 2014 @08:16PM (#8599418)
Correct. Though many languages don't encourage and as a result don't have nearly as many pure functions as Haskell code.
Re:Microsoft takes .NET open source and cross-platform by guscost on Wednesday November 12, 2014 @11:17PM (#8599900)
In fairness, I could also say that hammers don't encourage carpentry best practices and as a result they cause many more smashed fingers than wood glue. The fact that a tool doesn't prevent counterproductive usage patterns doesn't automatically make it inappropriate for every job.
Re:Microsoft takes .NET open source and cross-platform by jbooth on Thursday November 13, 2014 @12:58AM (#8600151)
Point being, I/O doesn't square with that concept. For some reason, every time I point this out, I'm accused of not appreciating the beauty of pure functions. I love pure functions. Maybe they're not appreciating the ugly reality of I/O?
Re:Microsoft takes .NET open source and cross-platform by codygman on Friday November 14, 2014 @07:26AM (#8606797)
How much experience do you have composing I/O in Haskell to prove that I/O doesn't square with that concept? Others here have experience using Haskell with I/O, but you just seem to have a hypothesis without experience or examples to support it.
Re:Microsoft takes .NET open source and cross-platform by dragonwriter on Thursday November 13, 2014 @01:00AM (#8600162)
> Point being, I/O doesn't square with that concept.

Sure it does, and composes well under it.

Re:Microsoft takes .NET open source and cross-platform by jbooth on Thursday November 13, 2014 @01:03AM (#8600171)
I'm seeing I/O as "side effects with possible random error conditions". I really don't see how that squares with functional purity.

It's late on EST but I promise if you put effort into explaining a higher-order take on this I'll put effort into reading and understanding it tomorrow. Have a good night.

Re:Microsoft takes .NET open source and cross-platform by codygman on Thursday November 13, 2014 @02:05PM (#8603369)
Through monads functional purity with I/O is achieved, ergo you can compose I/O and get other advantages of purity.
Re:Microsoft takes .NET open source and cross-platform by Dewie on Thursday November 13, 2014 @05:51AM (#8600856)
What "pure" means varies from language to language.
Re:Microsoft takes .NET open source and cross-platform by nbevans on Thursday November 13, 2014 @08:37PM (#8605362)
It really does not.