Do we really need const?

Regan Heath regan at netmail.co.nz
Mon Sep 17 04:15:06 PDT 2007


Matti Niemenmaa wrote:
> Bill Baxter wrote:
>> Matti Niemenmaa wrote:
>>> Java has a limited form of const in final, which allows for both 
>>> compile-time constants and variables which can only be assigned to once.
>>>
>>> See the "variables" and "fields" sections here: 
>>> http://renaud.waldura.com/doc/java/final-keyword.shtml
>> Yes, a lot of languages seem to have that form of const, which is more or
>> less like const is in D1.x.  That doesn't seem to be the problematic kind.
> 
> No. But it's more than D1.x's const, in that it can be used other than just for
> compile time constants.

It's like D2.0's 'final' then.

Regan



More information about the Digitalmars-d mailing list