preparing for const, final, and invariant
Don Clugston
dac at nospam.com.au
Fri May 18 10:27:16 PDT 2007
Walter Bright wrote:
> This is coming for the D 2.0 beta, and it will need some source code
> changes. Specifically, for function parameters that are arrays or
> pointers, start using 'in' for them.
>
> 'in' will mean 'scope const final', which means:
>
> final - the parameter will not be reassigned within the function
> const - the function will not attempt to change the contents of what is
> referred to
> scope - the function will not keep a reference to the parameter's data
> that will persist beyond the scope of the function
Looks great, although somewhat overwhelming for a newcomer.
Will functions be overloadable on all of these?
Anyway, it sounds as though we'll see 2.0 beta 1 before DMD 1.15 ?
More information about the Digitalmars-d-announce
mailing list