Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Using Enumerated Types as Array Indexes References: <4e4b0d81$0$314$14726298@news.sunsite.dk> <4e4b1fe4$0$314$14726298@news.sunsite.dk> <6d418cda-dab3-43df-a9ec-293b43f2bbd8@glegroupsg2000goo.googlegroups.com> <9b2aglFuj7U1@mid.individual.net> <9b72b5FrgfU1@mid.individual.net> <9b85ssF8vsU1@mid.individual.net> <9b9ckfF7uhU1@mid.individual.net> <9b9qreFj62U1@mid.individual.net> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 20 Aug 2011 16:15:20 GMT Lines: 24 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1313856920 tunews.univie.ac.at 71616 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7266 Robert Klemme wrote: > On 08/20/2011 01:45 PM, Andreas Leitgeb wrote: >> Not generally, but in a context, where you've got an integer uniformly >> cycling through a power-of-2 sized range, and quickly(develop-time-wise) >> need a uniform cycle on a smaller range. > ??? If the power of two is given then of course limiting sizes to power > of two is "natural" - whatever that means in case of a tautology. It was merely a semi-tautology: big (2^32) range on the one hand means that a (smaller) 2^# range on the other hand is easier handled. A triviality, of course, but not exactly a tautology. An irrelevancy, too, as it turned out, as you have no free choice on the smaller range. >> Since I can't believe the array's length itself is at stake here, I guess >> it's the objects that get stored in it, and only freed when overwritten. > Roughly. Items are not overwritten, dunno where you got that from. That was a weak (and obviously inaccurate) extrapolation from some vague patterns that I believed to recognize. > Andreas, you are on the Holzweg. :-) I expected the possibility of it happening :-)