Unofficial wish list status.(Jul 2008)

Walter Bright newshound1 at digitalmars.com
Wed Jul 23 18:06:15 PDT 2008


Jason House wrote:
> Walter Bright Wrote:
> 
>> Jason House wrote:
>>> No, I'm not.  I'm only suggesting that functions that are invariant
>>> and const functions are redefined to be like pure functions...
>>> Merging concepts together.  There's no reason for an invariant
>>> argument to a function require the function itself to be
>>> invariant/pure.
>> If invariance and purity were merged, then the whole system of invariant 
>> strings, which works great, would have to be scrapped. I don't see a 
>> gain that approaches that downside.
> 
> Why is that?

Because any function that takes a string argument (strings are 
invariant) would then have to be a pure function. You couldn't even write:

     writefln("hello world");

because I/O functions cannot be pure.



More information about the Digitalmars-d mailing list