Re: [Syntax-jsr] Re: [Java Spec Report] Re: JSR 201 autobox comments
Neal M Gafter <[email protected]> Fri, 09 Apr 2004 14:12:57 -0700
| Newsgroups | gmane.comp.java.spec-report |
|---|---|
| Organization | Sun Microsystems |
| Message-ID | <[email protected]> |
Robert Cartwright wrote: > I agree with Eric and I am glad that Emerson was not a PL designer. > Gratuitous inconsistency > in language design is the bane of both programmers (because it leads to > errors) and > compiler optimizers (because it inhibits optimizing transformations). > Of course, it would > be even better if there were NO observable differences between boxed and > unboxed > primitives in Java, a goal that we could have achieved if the expert > committee had embraced > the idea of using new interface types for boxed primitives (as proposed > by Gilad Bracha) > instead of the wretched legacy wrapper types (Integer, Double, Boolean, > etc.). As you know that would also have required deprecating the existing reflection APIs and replacing them with another set that uses the new wrapper interfaces, and it would be impossible for implementations of these interfaces to have .equals() methods that are consistent with both the behavior of the primitives and the Object.equals() contract. Great idea for a new language, impossible in Java. > The task of optimizing Java programs that perform numerical computation > on generic > classes--along the lines mentioned by Marc Petit-Huguenin--will be far > more difficult because > of the myriad semantic distinctions between boxed and unboxed values. > The most important > optimization--object inlining (unboxing a boxed data > representation)--will be impossible in many > situations. The expert committee determined that efficient numerical > computation, particularly > in the context of code involving generic types, is not a priority in the > evolution of Java. I > think that this decision is serious mistake that Java community will > ultimately regret. Perhaps, but I hope the community appreciates what they get in return: Java 1.5 sometime before 2010. ------------------------ 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/