Re: Adding const to java

"Kees van Reeuwijk" <>
6 Nov 2002 11:53:19 -0500

          From comp.compilers

Related articles
Adding const to java (Ghulam Lashari) (2002-10-24)
Re: Adding const to java (Onder Karpat) (2002-11-06)
Re: Adding const to java (Joachim Durchholz) (2002-11-06)
Re: Adding const to java (Ben L. Titzer) (2002-11-06)
Re: Adding const to java (Nils Hagge) (2002-11-06)
Re: Adding const to java (Kees van Reeuwijk) (2002-11-06)
| List of all articles for this month |

From: "Kees van Reeuwijk" <>
Newsgroups: comp.compilers
Date: 6 Nov 2002 11:53:19 -0500
Organization: TU Delft
References: 02-10-101
Keywords: Java
Posted-Date: 06 Nov 2002 11:53:18 EST

Ghulam Lashari <> 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
> runtime).

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.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.