News for hackers. Stuff that matters.
Re:Why Not Haskell? by jules on Tuesday October 18, 2011 @06:53AM (#3124705)
> My current opinion as to what would constitute a perfect language is: something built on top of Haskell which would, in some as-yet-unconceived-of way, make it easy to thread mutable state exactly where it needed to go in your code.

What's the difference between that and an imperative language?

Re:Why Not Haskell? by waqf on Tuesday October 18, 2011 @10:05AM (#3125213)
The difference is that it only makes well-defined, encapsulatable dependencies on your mutable state easy. It doesn't make totally screwing up easy.
Re:Why Not Haskell? by jules on Tuesday October 18, 2011 @11:40AM (#3125621)
I have a hard time imagining how such a thing would actually work. How would the compiler decide that mutable state somewhere is encapsulatable and somewhere else it is not? A compiler can (very easily in fact) monadify all code for you, but what you get is an inefficient imperative language.

It seems to me that a much better approach is to allow mutable state everywhere, but to inform the programmer of the consequences via the editor/IDE by showing the result of a static analysis that analyzes which functions are pure and which are not.