Revised RFC on range design for D2
KennyTM~
kennytm at gmail.com
Tue Sep 30 08:58:14 PDT 2008
Jason House wrote:
>
>
> Const and immutable functions can modify global state... So I don't think you'd want that.
>
Does "pure" in an object method takes the object itself as input also?
If so, then I mean the parenthesis can be omitted if the method is pure.
If not, then it has no solution in current D.
The problem is I see no official examples in pure object methods. So far
I can only find mentioning of pure global functions, or I've overlooked.
>
> PS: D's const functions don't guarantee they won't modify the object.
>
I still can't quite grasp the invariant-madness in D :p Practically I
have only used the "in" storage class in parameter list*, invariant
methods and .idup for some string-related manipulations.
P.S. *: "in" was "invariant scope". When did it changed to "const scope"??
>
>
>
>> I don't know what's the use of global functions that is pure AND does
>> not take any input.
>>
>>> Obviously, we're talking about property getters and not setters. I was told once already that such things are off topic :) I think it's relevant to the spirit of the conversation.
>
More information about the Digitalmars-d-announce
mailing list