Do we really need const?

Bill Baxter dnewsgroup at billbaxter.com
Mon Sep 17 03:59:03 PDT 2007


Matti Niemenmaa wrote:
> Bill Baxter wrote:
>> There's of course Java.  Lots of enterprise software is written in Java,
>> and yet Java does not have const.
> 
> 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.

--bb



More information about the Digitalmars-d mailing list