Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26129

Re: JLS 3/e -- Lots Of Errors

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail
From Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand>
Newsgroups comp.lang.java.programmer
Subject Re: JLS 3/e -- Lots Of Errors
Followup-To comp.lang.java.programmer
Date Sat, 05 Feb 2011 11:33:10 +1300
Organization Geek Central
Lines 24
Message-ID <iihur6$v02$1@lust.ihug.co.nz> (permalink)
References <iiflvc$keg$2@lust.ihug.co.nz>
NNTP-Posting-Host 118-92-86-70.dsl.dyn.ihug.co.nz
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace lust.ihug.co.nz 1296858791 31746 118.92.86.70 (4 Feb 2011 22:33:11 GMT)
X-Complaints-To abuse@ihug.co.nz
NNTP-Posting-Date Fri, 4 Feb 2011 22:33:11 +0000 (UTC)
User-Agent KNode/4.4.7
Xref csiph.com comp.lang.java.programmer:26129

Followups directed to: comp.lang.java.programmer

Show key headers only | View raw


Here’s an example of what I mean, from section 5.1.10, pages 89-90:

     5.1.10 Capture Conversion
     Let G name a generic type declaration with n formal type parameters A1
     ... An with corresponding bounds U1 ... Un. There exists a capture
     conversion from G<T1 ... Tn> to G<S1 ... Sn>, where, for 1 ≤ i ≤ n :
    • If Ti is a wildcard type argument (§4.5.1) of the form ? then Si is a
      fresh type variable whose upper bound is Ui[A1 := S1, ..., An := Sn]
      and whose lower bound is the null type.
    • If Ti is a wildcard type argument of the form ? extends Bi, then Si is
      a fresh type variable whose upper bound is glb(Bi, Ui[A1 := S1, ...,
      An := Sn]) and whose lower bound is the null type, where glb(V1,...
      ,Vm) is V1 & ... & Vm. It is a compile-time error if for any two
      classes (not interfaces) Vi and Vj,Vi is not a subclass of Vj or vice
      versa.
    • If Ti is a wildcard type argument of the form ? super Bi, then Si is a
      fresh type variable whose upper bound is Ui[A1 := S1, ..., An := Sn]
      and whose lower bound is Bi.

In all those three cases, Si occurs in its own definition. How are you 
supposed to make any sense of that circularity? It’s complete nonsense. The 
only way I can understand it is if all those instances of “Ui[A1 := S1, ..., 
An := Sn]” should actually be “Ui[A1 := T1, ..., An := Tn]”.

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 11:33 +1300

csiph-web