This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Kava for GCJ?
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Adam Megacz <gcj at lists dot megacz dot com>, "C. van Reeuwijk" <C dot vanReeuwijk at its dot tudelft dot nl>, gnustuff at thisiscool dot com
- Cc: java at gcc dot gnu dot org
- Date: Sat, 05 Jul 2003 08:02:00 -0500
- Subject: Re: Kava for GCJ?
- Reply-to: gnustuff at thisiscool dot com
Hi People,
>Maybe this is a dumb question, but could you explain to me how
>Adam's code has the same visible effect for reference and value
>classes with your additional restrictions? Taking Adam's example
>one step further:
>
> a.setState(Thing.HAPPY);
> b.setState(Thing.SAD);
Oops, I missed this part:
Kees> >- All fields must be 'final'
...which would appear to make the setter calls illegal
(unless I've misunderstood something).
Given this, I'm not understanding the usefulness of
such value classes at all, given that an immutable
Java class accomplishes the same thing, albeit more
efficiently.
The restriction on fields being final definitely does
not hold for value classes (structs) in C#, for example.
Thanks for bearing with these questions.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/