deepfinal modifier for Java

"Ghulam Lashari" <>
13 Nov 2002 12:19:20 -0500

          From comp.compilers

Related articles
Adding const to java (Ghulam Lashari) (2002-10-24)
deepfinal modifier for Java (Ghulam Lashari) (2002-11-13)
Re: deepfinal modifier for Java (Joachim Durchholz) (2002-11-15)
Re: deepfinal modifier for Java (Eric Eide) (2002-11-20)
| List of all articles for this month |

From: "Ghulam Lashari" <>
Newsgroups: comp.compilers
Date: 13 Nov 2002 12:19:20 -0500
Organization: Compilers Central
References: 02-10-101
Keywords: Java, design
Posted-Date: 13 Nov 2002 12:19:20 EST

>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).

In fact, I had implemented a "deepfinal" modifier for Java. A deepfinal
variable differs from final in a way that in addition to the reference, the
object value can also not be modified i.e., any field/reference that a
deepfinal modifier points to (directly or transitively) can also not be
modified. A deepfinal variable or its fields (direct or transitive) will
only be allowed to call a deepfinal method. A deepfinal method similarly
will have the contract that it won't allow invokation of any non-deepfinal
methods on 'this' variable or any of the fields (direct or transitive) of
'this' variable.

Is there any usefulness of this thing in Program analysis (static analysis),
Invariant detection etc?

Post a followup to this message

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