Do we really need const?

Matti Niemenmaa see_signature at for.real.address
Mon Sep 17 04:16:10 PDT 2007


Regan Heath wrote:
> 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.

Yep.

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi



More information about the Digitalmars-d mailing list