const

Walter Bright newshound1 at digitalmars.com
Fri Mar 28 12:14:01 PDT 2008


Jason House wrote:
> In my dream world implementation of all things const, D would do the following things:
>   readonly (ro, or some variant) would mean a read only view
>   invariant would mean the data never changes, period
>   manifest declares a manifest constant
>   const would have two meanings:
>     1. Variable declarations - a true constant
>     2. Function parameters - a promise not to modify the data

That's 5 different kinds of constants (as opposed to the current 3). I 
can hear the protests already <g>.



More information about the Digitalmars-d mailing list