Re: Newbie question - Disadvantages of java
From: Thomas G. Marshall (tgm2tothe10thpower_at_hotmail.replaceTextWithNumber.com)
Date: 10/27/03
- Next message: VisionSet: "Re: How to implement Comparable with objects?"
- Previous message: John C. Bollinger: "Re: [semi-OT] java objects persistence and XML id/idref"
- In reply to: xarax: "Re: Newbie question - Disadvantages of java"
- Next in thread: Timo Kinnunen: "Re: Newbie question - Disadvantages of java"
- Reply: Timo Kinnunen: "Re: Newbie question - Disadvantages of java"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Oct 2003 16:54:29 GMT
xarax <xarax@email.com> coughed up the following:
> "Thomas G. Marshall"
> <tgm2tothe10thpower@hotmail.replaceTextWithNumber.com> wrote in
> message news:IAbnb.16920$1C5.5231@nwrdny02.gnilink.net...
>> Ronald Fischer <ronaldf@eml.cc> coughed up the following:
>>
>>> "Thomas G. Marshall"
>>> <tgm2tothe10thpower@hotmail.replaceTextWithNumber.com> wrote in
>>> message news:<FXhmb.196$1C5.28@nwrdny02.gnilink.net>...
>>>> Being the person that opened up this pandora's null box, I'd still
>>>> like to
>>>> know precisely /why/ null need be of type null.
>>>
>>> My personal guess: This is because perhaps the following underlying
>>> principle was
>>> implicitly assumed when designing the language:
>>>
>>> "Every expression shall of a certain type (irrespective of the
>>> context
>>> in which it is
>>> used)".
>>
>> Then what is the type of the expression "32767" ?
>>
>> short s = 32767;
>>
>> It seems according to the specification that it is indeed an int,
>> but there is a "special rule" for assignments that allow it to be
>> downwardly assignable to sorts without cast.
>>
>> Special rules abound. Making "null" a typeless literal seems really
>> far more benign a rule-break than making it a value of a special
>> type that is always assignable without cast:
>>
>> Thang thang = null;
>>
>> What's worse:
>>
>> Having a type value that is assignable to all object types
>> without cast? or
>> Having a litteral that is assignable to all object types?
>> (remember, no cast, because it has no type).
>
> The reasoning is that "null" has a built-in type that implicitly
> inherits from all reference types (the only case of multiple
> inheritance), and is thus assignable to any reference type
> and castable to any reference type.
That's NOT "REASONING". That's factual information.
My posts are discussing the /why/ and /what if/, not the /what is/.
- Next message: VisionSet: "Re: How to implement Comparable with objects?"
- Previous message: John C. Bollinger: "Re: [semi-OT] java objects persistence and XML id/idref"
- In reply to: xarax: "Re: Newbie question - Disadvantages of java"
- Next in thread: Timo Kinnunen: "Re: Newbie question - Disadvantages of java"
- Reply: Timo Kinnunen: "Re: Newbie question - Disadvantages of java"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|