Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: [JLS] new long[0][ -1 ] Date: Sat, 1 Aug 2015 10:23:04 +0000 (UTC) Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <55bc07c7$0$301$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 1 Aug 2015 10:23:04 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="6584"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18onggNTKSpAP57ThANl5SpZiaMadzazpM=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:BF/5ikqkZawxFwgOl1YxdXBOX7o= Xref: csiph.com comp.lang.java.programmer:32239 On Fri, 31 Jul 2015 19:41:58 -0400, Arne Vajhøj wrote: >> IME you can achieve the same in Java by using TreeMap or HashMap, >> the choice probably depending on whether you need ordered access to the >> array elements. > > I am sure that something can be constructed. But I don't think it will > have the simplicity as in those other languages. > I dunno: writing TreeMap is simple enough, very explicit and rather easy to instantiate and use. I don't know Ada, but the Algol 68 equivalent is very similar: mymode[myindextype] a[-500:500]; -- martin@ | Martin Gregorie gregorie. | Essex, UK org |