Learning Haskell makes you a better programmer?

Timon Gehr timon.gehr at gmx.ch
Wed Dec 26 17:43:15 PST 2012


On Thursday, 27 December 2012 at 00:56:02 UTC, Andrei 
Alexandrescu wrote:
> On 12/26/12 7:11 PM, Timon Gehr wrote:
>> On 12/27/2012 12:53 AM, Andrei Alexandrescu wrote:
>>> On 12/26/12 6:13 PM, Timon Gehr 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.
>>>>>
>>>>
>>>> Haskell has this.
>>>
>>> This would necessitate a bit of qualification :o).
>>>
>>> Andrei
>>
>> http://www.haskell.org/haskellwiki/Monad/ST
>
> That's not the same!
>
> Andrei

It is isolated state mutation inside a pure function, which is 
what Walter emphasized on.



More information about the Digitalmars-d mailing list