Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Usefulness of "final" (Was: Re: Inserting In a List) Date: Fri, 05 Apr 2013 21:54:46 +0200 Lines: 21 Message-ID: References: <19un43xj77bua.vw45l4e2wshi.dlg@40tude.net> <515cabb2$0$32111$14726298@news.sunsite.dk> <515cc192$0$32109$14726298@news.sunsite.dk> <515cc46b$0$32111$14726298@news.sunsite.dk> <515cc8e5$0$32109$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net psoXMKs0MExfKOhARTUbXQ3DtD498I+QdDFxX1HWvmXZlReYU= Cancel-Lock: sha1:iEW/uo4rkB25pclBenySpvPGCus= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:23341 On 04/04/2013 11:29 PM, markspace wrote: > On 4/4/2013 1:53 PM, Robert Klemme wrote: >> Immutability (or constness) of an object is a tricky concept. There are >> at least two useful and totally reasonable definitions: >> >> 1. State (as in: bit patterns in memory) of a const object never changes. >> >> 2. The user of a const object can never observe any state changes; put >> differently: all methods of a constant object always return the same >> results for the same inputs. >> You can also see that from the development C++ took: keyword "mutable" > > I think it's a mistake to conflate Java with other languages. I didn't conflate anything. I used features of another language to illustrate aspects of the concept constness / immutability. Cheers robert