Re: [Java Spec Report] Re: JSR 201 autobox comments

Neal M Gafter <[email protected]> Thu, 08 Apr 2004 14:48:34 -0700
Newsgroups gmane.comp.java.spec-report
Organization Sun Microsystems
Message-ID <[email protected]>
Pat LaVarre wrote:
> Autoboxing without constant null and complete "identity" can't let
> people forget about the difference between primitive and reference types.
> 
> What of the example:
> 
> final static Integer i = 5;
> final static Integer j = 5;
> final static Integer n = null;
> final static Integer p = 0x8001;
> final static Integer q = 0x8001;
> final static Boolean bo1 = (n instanceof Object);
> final static Boolean bo2 = false;
> 
> Do we agree the draft we have promises us:
> 
>         i == j
>         (p == q) || (p != q)
>         (bo1 == bo2)
> ?
> 
> Are we then proposing to make i j p q bo2 constant, but n and bo1 not?

No.  None of them are constant.  Besides the fact that the initializing 
expression for bo1 is nonconstant, none of these variables are of a primitive 
type or String.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/5cFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this mailing list, send an email to:
[email protected]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/java-spec-report/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/