From: Marcin 'Qrczak' Kowalczyk Date: 2003-05-21T04:14:00+09:00 Subject: Re: Ruby reference recommendations Dnia wto 20. maja 2003 18:53, Robert Klemme napisa�: > Since there is no way in Java to define a class a having immutable > instances There is: just don't provide any method which changes attributes. A pity that an attribute can't be exposed read-only. > IMHO the approach taken in Java (and in Ruby also) is the most > reasonable one. The flaw in the Java approach is that there is no single operation which is both definable for user classes (and defined for classes like string to compare contents) and works for int (and other primitive types). -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/