Map Lambda with Side-Effects

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 13 03:37:48 PST 2015


On Tue, 13 Jan 2015 11:26:01 +0000
bearophile via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> ketmar:
> 
> > that will effectively rule out any usage of some global vars or 
> > other
> > external state, turning it into either unnecessary mess, or 
> > unusable
> > theoretical crap.
> 
> "Unusable theoretical crap" is better than the current trap :-)
in no way. this just turns Phobos into the same unusable crap, removing
the whole sense of having good standard library.

> We hare "pure" in D, but still we have not grown up to actually 
> use it in Phobos, for higher order functions, or parallelism.
let an user choose if he wants pure or impure HOF args. just make a big
warning in documentation about unpredictability of HOFs with
side-effects and this will be enough, i believe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150113/5deffe83/attachment.sig>


More information about the Digitalmars-d-learn mailing list