Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.java.programmer Subject: Re: Java puzzler Date: Thu, 12 May 2011 00:28:50 -0400 Organization: The Wasteland Lines: 23 Message-ID: References: <4db69c13-878f-4806-adb2-a3c5adb1c48c@glegroupsg2000goo.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3998 In article , Tom Anderson wrote: [...] > So, would it have been possible to write the language rules such that > integer literals have either some sort of indeterminate-length > pseudo-type that can be used submissively in all sorts of > expressions, or to have small integer literals have type byte, bigger > ones type short, and so on? I'm not sure about Java, but this is standard in Ada. Universal types [1] allow an implementation to use such literals as Ada.Numerics.π and Ada.Numerics.e [2]. As a consequence, a popular implementation [3] depends on mpfr and gmp. [1] [2] [3] [4] -- John B. Matthews trashgod at gmail dot com