Transients or scoped immutability

Don nospam at nospam.com
Tue Apr 26 00:39:23 PDT 2011


bearophile wrote:
> Jesse Phillips:
> 
>> To me it sounds really nice an clean, do you think it would work for you?
> 
> Maybe you have missed the last two lines of my post:
> 
>> This idea is good and it will help, but it needs a function call:
>> http://d.puremagic.com/issues/show_bug.cgi?id=5081
> 
> I like that idea and I think it will be good to have in D. But I think it's not enough, to solve the problem I have shown it requires a not simple function signature, you need to instantiate the static array before the call point (that's not nice and asks for two names for the same array), to use ref both in input and output, etc.

Just use a delegate literal (with a fix to 5081).


More information about the Digitalmars-d mailing list