Learning Haskell makes you a better programmer?

Walter Bright newshound2 at digitalmars.com
Tue Dec 25 15:11:16 PST 2012


On 12/25/2012 11:57 AM, Jakob Bornecrantz wrote:
> On Tuesday, 25 December 2012 at 19:37:42 UTC, Walter Bright wrote:
>> Note that D offers this style of programming, with checkable purity,
>> immutability and ranges. I think it is a very important paradigm.
> I think you missed a big part here, the by default of purity. It is in D more
> work to enforce purity of functions then not.

I think optional purity is pretty powerful. You can have the advantages of 
either, at your choice.

> The other part he talked about is countered in the language (as well to a
> worrying degree in Phobos) with function returns of type auto.
>
> Taking his example:
> foo :: Map Integer String -> String -> auto
>
> Even if the function always returns integer it only requires one function to not
> do that and you would start second guessing every function returning auto.

Nobody makes you use auto, either.



More information about the Digitalmars-d mailing list