Logical const
Don
nospam at nospam.com
Thu Dec 2 01:18:31 PST 2010
Walter Bright wrote:
> spir wrote:
>> What would be the consequences if D had no const, only immutable
>> (that, IIUC, removes the latter non-guarantee)?
>
> You'd have to write most every function twice, once to take immutable
> args and again for mutable ones.
Doesn't 'inout' do almost the same thing?
The only difference I can see between const and inout, is that inout
tells which parameters could be aliased with the return value.
More information about the Digitalmars-d
mailing list