|Adding const to java email@example.com (Ghulam Lashari) (2002-10-24)|
|Re: Adding const to java firstname.lastname@example.org (Onder Karpat) (2002-11-06)|
|Re: Adding const to java email@example.com (Joachim Durchholz) (2002-11-06)|
|Re: Adding const to java firstname.lastname@example.org (Ben L. Titzer) (2002-11-06)|
|Re: Adding const to java email@example.com (Nils Hagge) (2002-11-06)|
|Re: Adding const to java C.vanReeuwijk@twi.tudelft.nl (Kees van Reeuwijk) (2002-11-06)|
|From:||"Kees van Reeuwijk" <C.vanReeuwijk@twi.tudelft.nl>|
|Date:||6 Nov 2002 11:53:19 -0500|
|Posted-Date:||06 Nov 2002 11:53:18 EST|
Ghulam Lashari <firstname.lastname@example.org> wrote:
> I have implemented "const" modifier in Java Programming Language. The
> semantics of const are similar to that of C++. I am trying to experiment if
> there is any usefulness of this modifier for example in gc etc. I am looking
> for some opinions/suggestions here about what domains of the usefulness of
> this modifier can/should be explored (for example in Virtual Machine
When you have registered yourself at Sun as a developer, you can access
their bug tracking database. Adding const to Java is in the top ten of
requested features in that database. If I recall correctly, the original
feature request is fairly detailed, and there is also a long discussion
of the advantages and disadvantages there from people that voted for
that feature (or didn't).
Personally, I think that its main advantage is the additional code
checking that it allows. Although I wouldn't be surprised if a smart
compiler or garbage collector could take advantage of it, I don't expect
it to have a significant impact.
Also, to be effective 'const' must also be added to the standard
library. Getting that right is a major undertaking, and may well be the
biggest hurdle to overcome.
Return to the
Search the comp.compilers archives again.