Full closures for D

Lars Noschinski lars-2006-1 at usenet.noschinski.de
Sat Nov 10 12:18:59 PST 2007


* 0ffh <spam at frankhirsch.net> [07-11-05 22:41]:
>Bruce Adams wrote:
>>KlausO Wrote:
>>Someone with more a functional programming background may be able to
>>enlighten us but doesn't the existence of proper closures allow us to
>>implement monads as a library now? Though I can't quite see in what
>>situation we would want to use them.
>
>Yup, IIRC the poor strictly functional guys needs them for I/O, but as
>we're imperative anyway I don't see any applications for monads either.

Monads have other applications, too. You can use them for error handling
(in a similar way NaN works in floating point operations) for example.



More information about the Digitalmars-d mailing list