Pure functions in D

renoX renosky at free.fr
Thu Oct 2 14:21:14 PDT 2008


bearophile a écrit :
> Sorry, I have forgotten to add a small thing. In Haskell they have
> solved the debugging problem in some ways, like this:
> 
> http://cvs.haskell.org/Hugs/pages/libraries/base/Debug-Trace.html
> 
> But that solution may require installing the concept of monads into
> the brain of most D programmers first :-)

Sure, D should have monads as soon as Haskell programmers are able to 
explain this concept to 'normal' programmers (and no cheating such as 
the classical handwaving, this is a way to wrap side effects..)
So probably never then.

That said, I agree very much that allowing debug output and memory 
allocation in pure function makes them much more useful while keeping 
their 'purity'.

So I vote +1
Bye,
renoX

> Bye, bearophile



More information about the Digitalmars-d mailing list