Which language futures make D overcompicated?
Andrea Fontana
nospam at example.com
Fri Feb 9 15:27:18 UTC 2018
On Friday, 9 February 2018 at 15:09:10 UTC, Mike Parker wrote:
> On Friday, 9 February 2018 at 14:59:38 UTC, Ralph Doncaster
> wrote:
>
>> const auto MAX_IN = 20;
>
> const MAX_IN = 20;
>
> The auto is superfluous and is only needed when there's no
> storage class or type.
>
>>
>> Others say to use enums. It turns out enums seems to be the
>> best, as they don't create a symbol in the object file, but
>> const auto does.
>
> If you need to take the address of a constant, use immutable or
> const (doesn't really matter, but I prefer immutable). If you
> don't need the address, use enum.
Why not static immutable?
More information about the Digitalmars-d
mailing list