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


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

Re: Direct Supertypes?

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Direct Supertypes?
Date Thu, 2 Jul 2015 07:38:07 -0400
Organization A noiseless patient Spider
Lines 50
Message-ID <mn37of$5vv$1@dont-email.me> (permalink)
References <Supertypes-20150702023231@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Thu, 2 Jul 2015 11:36:47 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="6143"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hZT1Yp/D3obdqnlBT9ThR"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1
In-Reply-To <Supertypes-20150702023231@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:q47DiCMbUkHb4mmb5Tb94KiJ8Gw=
Xref csiph.com comp.lang.java.programmer:31919

Show key headers only | View raw


On 7/1/2015 8:42 PM, Stefan Ram wrote:
>    There once was a publication called »JLS 7«, and it
>    had this definition:
>
> 4.10.2 Subtyping among Class and Interface Types
>
> Given a generic type declaration C<F1,...,Fn>, the direct
> supertypes of the parameterized type C<T1,...,Tn> are all
> of the following:
> o The direct superclasses of C.
> o The direct superinterfaces of C.
> o The type Object, if C is an interface type with no direct
>    superinterfaces.
> o The raw type C.
>
>    AFAIK, there is no special section for non-generic
>    supertypes, so I assume that the above is valid for
>    non-generic types C too (with n = 0).

     Since the quoted language specifically said "a generic
type," the assumption seems none too reliable ...

>    Now there is a publication called »JLS 8«, and it
>    has this definition:
>
> 4.10.2 Subtyping among Class and Interface Types
> Given a non-generic type declaration C, the direct
> supertypes of the type C are all of the following:
> o The direct superclass of C (§8.1.4).
> o The direct superinterfaces of C (§8.1.5).
> o The type Object, if C is an interface type with no
>    direct superinterfaces (§9.1.3).

     This is the new material in JLS 8, inserted immediately
before a nearly exact replica of the JLS 7 text you quoted.
One of the few differences between the 7 and 8 versions is
that 8 adds "(n > 0)" ...

>    No more »raw type C« for non-generic type declarations?
>
>    So, java.lang.String once was a direct supertype of
>    java.lang.String, but today it is not?

     As I understand the original, String was never a direct
supertype of String, because String is not and never was
a generic type.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

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


Thread

Re: Direct Supertypes? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-02 07:38 -0400

csiph-web