Unofficial wish list status.(Jul 2008)

Jason House jason.james.house at gmail.com
Wed Jul 23 18:21:30 PDT 2008


Walter Bright wrote:

> 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.

I must have really messed up something that I said somewhere along the line
because you're the second person to think that!  writefln is neither
invariant nor pure and would not be modified by this discussion.



More information about the Digitalmars-d mailing list