Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Bulk Array Element Allocation, is it faster? Date: Sun, 25 Sep 2011 00:23:01 -0700 Organization: Canadian Mind Products Lines: 30 Message-ID: <5mlt77d8430ejb2mnetkgoh72akphpvh2t@4ax.com> References: <32256761.625.1316931765221.JavaMail.geo-discussion-forums@prht31> Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8282 On Sat, 24 Sep 2011 23:22:45 -0700 (PDT), Lew wrote, quoted or indirectly quoted someone who said : >Foo#bar will be cleared to 'null' upon first construction, then initialized to 'null' by the explicit initialization. > Both steps happen. Both steps are required to happen, and they're required to happen separately. I doubt that. The JLS never says exactly how something works, just what the net effect must be. It is part of what makes it so difficult to follow. A JLS for programmers rather than implementors might describe a simple reference implementation, and say, "As a programmer you can presume it works like this, but actual implementations will be more sophisticated and may not give exactly the same behaviour as this simple explanation. For those fine points, see the implementors JLS." So for example it could describe how a simple GC works. In most cases the second init to null could be dropped by a clever optimiser because it would have the same net effect. Of course I defer to you and Patricia on divining the meaning of the JLS. -- Roedy Green Canadian Mind Products http://mindprod.com It should not be considered an error when the user starts something already started or stops something already stopped. This applies to browsers, services, editors... It is inexcusable to punish the user by requiring some elaborate sequence to atone, e.g. open the task editor, find and kill some processes.