Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jim Janney Newsgroups: comp.lang.java.programmer Subject: Re: Usefulness of "final" (Was: Re: Inserting In a List) Date: Thu, 04 Apr 2013 13:51:19 -0600 Organization: a short table of even primes Lines: 18 Message-ID: References: <19un43xj77bua.vw45l4e2wshi.dlg@40tude.net> <1m6qixygl0s9c$.1fv60gxfuhuyz.dlg@40tude.net> <117qwc9w50mtb.1aizwvzf7bigo.dlg@40tude.net> <515cc4ef$0$32111$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx05.eternal-september.org; posting-host="c75a2e3068ccf6c98395286f3e40b97d"; logging-data="26166"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jnIc+qE4AG0uPBy8PkqWG" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:ACOwt5fDVo+Dt4+zuCInzjxUYWU= sha1:TjcKS4EDaggJyTFIiWplBHe6aSo= Xref: csiph.com comp.lang.java.programmer:23314 markspace writes: > On 4/3/2013 5:10 PM, Arne Vajhøj wrote: >> >> It can be very important in multithreaded context. >> >> But it is not what makes a class immutable. > > OK, that's true. The section I linked to refers to such objects as > "thread safe immutable." It's both concepts in one package. Objects > that aren't thread safe aren't immutable, and objects that aren't > immutable aren't thread safe. I guess that's why the two go together. Immutable objects don't need to be defensively copied. This can be useful even in situations where thread safety doesn't apply. -- Jim Janney