Learning Haskell makes you a better programmer?

Thiez thiezz at gmail.com
Wed Dec 26 14:48:50 PST 2012


On Wednesday, 26 December 2012 at 22:09:26 UTC, Walter Bright 
wrote:
> But D also does something I think is fairly unique. A function 
> can be pure, but inside that function, mutation is allowed as 
> long as that mutation does not "leak" outside of the function. 
> A pure function with immutable parameters does completely 
> specify the function in its signature. What happens inside the 
> function is not relevant, it is not necessary that locals be 
> immutable.

Rust can also do this. Apparently there were (are?) plans to 
allow pure functions that call impure delegates, as long as the 
delegate has been provided by the caller, but I'm not sure if 
they implemented that yet (or perhaps they've ditched the idea 
entirely).


More information about the Digitalmars-d mailing list