<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx</link><description>Today was the first real day of JavaOne. I woke up, worked out, and got to the convention center in time to play a game or two of pinball before I went to the keynote. There are a bunch of pin, air hockey, and foos tables around, and one of the pins is</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#168857</link><pubDate>Tue, 29 Jun 2004 15:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:168857</guid><dc:creator>Quaid</dc:creator><description>Java version numbering - WTFrick!?&lt;br&gt;&lt;br&gt;I thought 1.5 was 'Java 2.0' (this being crazy in itself), but now the next version is 'Java 5.0'.&lt;br&gt;&lt;br&gt;!??!?</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#168859</link><pubDate>Tue, 29 Jun 2004 16:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:168859</guid><dc:creator>Nicholas Allen</dc:creator><description>This is a great summary.  There were a few things that caught my eye.&lt;br&gt;&lt;br&gt;In the new features section, it sounds like that talk really missed the audience.&lt;br&gt;&lt;br&gt;&amp;gt; Improvements in starting time&lt;br&gt;&lt;br&gt;I talked a little about that with Junfeng Zhang in the past.  Somewhat similar but not quite the same as ngen.&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://blogs.msdn.com/junfeng/archive/2004/04/12/111310.aspx"&gt;http://blogs.msdn.com/junfeng/archive/2004/04/12/111310.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;gt; New look and feel support&lt;br&gt;&lt;br&gt;Java has always had pluggable look and feels but there's very few 3rd party ones available.  Mostly it was considered too hard to be worth it.  In addition to updating the old Metal style, this is supposed to make 3rd party L&amp;amp;F creation easy.&lt;br&gt;&lt;br&gt;&amp;gt; one of the important design points for the Java version was that it run on all existing JVMs (ie its 1.4 compatible)&lt;br&gt;&lt;br&gt;This isn't true.  If you use 1.5 language features, you're forced to use a 1.5 VM.  What they probably said was that code compiled for 1.4 had to work correctly when used with code compiled for 1.5 (and using generics).  They support old code on new platforms (backward compat).  They do not support new code on old platforms (forward compat).</description></item><item><title>Eric Gunnerson at JavaOne</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#168870</link><pubDate>Tue, 29 Jun 2004 19:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:168870</guid><dc:creator>David's hubris-o-rama</dc:creator><description /></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#168910</link><pubDate>Tue, 29 Jun 2004 16:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:168910</guid><dc:creator>Nikolay Botev</dc:creator><description>The following caught my attention and I really could not resist testing it out:&lt;br&gt;&lt;br&gt;&amp;gt;There are some issues on this that have to do &amp;gt;with object identity. Consider the following:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;Map m = new Map&amp;lt;Integer, String&amp;gt;();&lt;br&gt;&amp;gt;m.add(3, foo);&lt;br&gt;&amp;gt;string s = m.at(3);&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;What does the third line do? Well, it turns &amp;gt;out that the two 3 values arent the same &amp;gt;because they are autoboxed to different &amp;gt;reference types. That behavior is a bit &amp;gt;surprising.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;To improve the situation, theyve come up with &amp;gt;an interesting modification, which I believe &amp;gt;this is not part of the standard, but part of &amp;gt;javac. &lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;They get around this and Im not making this &amp;gt;up by playing tricks for small integer &amp;gt;values, but not for large integer values. &amp;gt;They did not give an exact description for &amp;gt;how this behavior is controlled. &lt;br&gt;&lt;br&gt;I don't know, maybe I'm doing something wrong, but this example (when all the errors are corrected) seems to work fine for me with large integers (maybe I'm not using a &amp;quot;real&amp;quot; large value?). I did uncover another problem though, but the point is - there doesn't seem to be any &amp;quot;playing tricks with small integers&amp;quot;. I wonder what the &amp;quot;magic&amp;quot; number is that Sun chose to separate the space of small ints from large ints :-D. I'm also interested to find out what the source of that information is.&lt;br&gt;&lt;br&gt;The code that I compiled and ran under the latest snapshot release of Java 5 is below. &lt;br&gt;&lt;br&gt;The problem I uncovered was when the key is of type Long and an int is used to retrieve the value. The value is not found and this only makes sense, however, this makes space for obscure bugs and should ideally either trigger a compile-time error or automatically autobox to Long instead of Integer.&lt;br&gt;&lt;br&gt;import java.util.Map;&lt;br&gt;import java.util.HashMap;&lt;br&gt;&lt;br&gt;class testnum&lt;br&gt;{&lt;br&gt;	public static void main(String args[])&lt;br&gt;	{&lt;br&gt;		Map&amp;lt;Integer, String&amp;gt; m = new HashMap&amp;lt;Integer, String&amp;gt;();&lt;br&gt;&lt;br&gt;		m.put(3, &amp;quot;foo&amp;quot;);&lt;br&gt;		String s = m.get(3);&lt;br&gt;		System.out.printf(&amp;quot;First item: %s\n&amp;quot;, s);&lt;br&gt;&lt;br&gt;		m.put(300400600, &amp;quot;boo&amp;quot;);&lt;br&gt;		s = m.get(300400600);&lt;br&gt;		System.out.printf(&amp;quot;Big item: %s\n&amp;quot;, s);&lt;br&gt;&lt;br&gt;		m.put(2100400600, &amp;quot;woohaaa&amp;quot;);&lt;br&gt;		s = m.get(2100400600);&lt;br&gt;		System.out.printf(&amp;quot;Very big item: %s\n&amp;quot;, s);&lt;br&gt;&lt;br&gt;		Map&amp;lt;Long, String&amp;gt; m2 = new HashMap&amp;lt;Long, String&amp;gt;();&lt;br&gt;&lt;br&gt;		m2.put(9L, &amp;quot;smallee&amp;quot;);&lt;br&gt;		s = m2.get(9L);&lt;br&gt;		System.out.printf(&amp;quot;Long 1st item: %s\n&amp;quot;, s);&lt;br&gt;		s = m2.get(9); // auto-boxed to Integer?&lt;br&gt;		System.out.printf(&amp;quot;Long 1st item problem!: %s\n&amp;quot;, s);&lt;br&gt;&lt;br&gt;		m2.put(9223372036854775807L, &amp;quot;now this is crazy!&amp;quot;);&lt;br&gt;		s = m2.get(9223372036854775807L);&lt;br&gt;		System.out.printf(&amp;quot;It really doesn't get any bigger than this: %s\n&amp;quot;, s);&lt;br&gt;	}&lt;br&gt;}&lt;br&gt;</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#168986</link><pubDate>Tue, 29 Jun 2004 18:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:168986</guid><dc:creator>thomas woelfer</dc:creator><description>Eric,&lt;br&gt;&lt;br&gt;thanks for the summary. almost as good as beeing there in person... :)&lt;br&gt;&lt;br&gt;WM_THX&lt;br&gt;thomas woelfer</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#169015</link><pubDate>Tue, 29 Jun 2004 18:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169015</guid><dc:creator>Robert O'Callahan</dc:creator><description>&amp;gt; Map m = new Map&amp;lt;Integer, String&amp;gt;();&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; m.add(3, foo);&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; String s = m.at(3);&lt;br&gt;&lt;br&gt;This will work fine. The boxed versions of 3 may or may not be the same object, but they will be equal according to equals() and hashCode(). I think Mr Gunnerson is confused.</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#169063</link><pubDate>Tue, 29 Jun 2004 19:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169063</guid><dc:creator>Nicholas Allen</dc:creator><description>Where it'll break is IdentityHashMap or other code which uses == for identity instead of equals for identity.  But we've lived through that long enough with strings and survived.</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#169216</link><pubDate>Tue, 29 Jun 2004 22:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169216</guid><dc:creator>Luke Hutteman</dc:creator><description>Your C# foreach code can be done in 5.0 using the new for-construct &amp;quot;for (int i: a)&amp;quot; - not quite as easy to read/understand as c#'s foreach notation, but it essentially does the same thing and I can understand a reluctance to introduce new keywords.&lt;br&gt;&lt;br&gt;as others have noted, the Map example only breaks down when you use an IdentityHashMap, which is a fairly little used Map implementation that uses object equality instead of hashcode() and equals(). For more information on IdentityHashMap and some usage examples, check out the JavaDocs at &lt;a target="_new" href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/IdentityHashMap.html"&gt;http://java.sun.com/j2se/1.4.2/docs/api/java/util/IdentityHashMap.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#169240</link><pubDate>Tue, 29 Jun 2004 23:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169240</guid><dc:creator>Chad Myers</dc:creator><description>As a former Java developer, it's kinda sad to see Sun flailing around like this (implementing some new features, but only half-way or healt-heartedly) and trying to strike back at C# or something.&lt;br&gt;&lt;br&gt;Java started out so pure and straight-forward and I was proud to develop on it.&lt;br&gt;&lt;br&gt;But now whenever I have to go back and try to use it, I'm confounded by it's lack of progress. It's not very different now (1.4 or 5 ) than it was in the 1.3 days. Very little XML support (or chumpy support at that)... very little of anything. If you want to do anything useful with Java, you have to end up downloading 35 different 3rd-party libraries (most usually from Apache-Jakarta) and then enter into &amp;quot;Classpath Hell&amp;quot;.&lt;br&gt;&lt;br&gt;It just leaves me scratching my head.&lt;br&gt;&lt;br&gt;On that note, excellent work on C# 1.x and 2.0 Eric and Team. I'm rarely left scratching my head on anything (well, unsafe stuff still confuses me, but you know what I mean).</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#169588</link><pubDate>Wed, 30 Jun 2004 08:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169588</guid><dc:creator>Jocelyn Coulmance</dc:creator><description>&amp;gt; One of the disadvantages in some generic approaches (C# included) is that theres no way to express List&amp;lt;anything&amp;gt;.  Well, actually, there is you can write:&lt;br&gt;&lt;br&gt;&amp;gt; List&amp;lt;object&amp;gt; c;&lt;br&gt;&lt;br&gt;List&amp;lt;?&amp;gt; should not be read as &amp;quot;List of anything&amp;quot; (which is what List&amp;lt;object&amp;gt; conveys) but &amp;quot;any list of something&amp;quot;.&lt;br&gt;And yes, this is a feature I'd like to have in C#.&lt;br&gt;</description></item><item><title>Notes from JavaOne</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#169857</link><pubDate>Wed, 30 Jun 2004 18:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169857</guid><dc:creator>Rubber Chicken</dc:creator><description>Some interesting notes from a Microsoft attendee at JavaOne....</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#171203</link><pubDate>Thu, 01 Jul 2004 20:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:171203</guid><dc:creator>John Harby</dc:creator><description>Thanks for your insights, this is very interesting.</description></item><item><title>JavaOne 2004: Final Thoughts</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#177352</link><pubDate>Thu, 08 Jul 2004 18:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:177352</guid><dc:creator>Eric Gunnerson's C# Compendium</dc:creator><description /></item><item><title>Java vs Whidbey Generics</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#177917</link><pubDate>Fri, 09 Jul 2004 05:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:177917</guid><dc:creator>Girish Bharadwaj</dc:creator><description /></item><item><title>test</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#177937</link><pubDate>Fri, 09 Jul 2004 06:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:177937</guid><dc:creator>protected virtual void jayBlog {</dc:creator><description /></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#179062</link><pubDate>Sat, 10 Jul 2004 06:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:179062</guid><dc:creator>Joe Cheng</dc:creator><description>If I understand correctly, the &amp;quot;wildcards in generics&amp;quot; feature is better known elsewhere as covariance/contravariance.</description></item><item><title>Identity of boxed integers</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#182073</link><pubDate>Tue, 13 Jul 2004 20:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:182073</guid><dc:creator>Stephen Leach</dc:creator><description>I agree that the Java dev have made a crucial design decision here.  Experimentation with Java 1.5/5.0 shows that very small integers box identically and large ones don't.  I also agree it is a mistake - it is a rerun of the String.intern() mistake.</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#182418</link><pubDate>Tue, 13 Jul 2004 22:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:182418</guid><dc:creator>Bernhard Messerer</dc:creator><description>Indeed, the spec says that this &amp;quot;small int trick&amp;quot; is done with byte-values: All byte values MUST be cached and thus will be boxed to the same (&amp;quot;==&amp;quot;) integer (thus it even works with IdentityHashMap).&lt;br&gt;For larger ints, behavior is unspecified, they may or may not be cached, in Sun's implementation (JDK 1.5 Beta2) it will use Integer.valueOf(int), which caches &amp;quot;frequently used&amp;quot; values, so it should even work with larger numbers... no guarantee though...&lt;br&gt;Note that it worked differently with Beta1, this one didn't cache any values...&lt;br&gt;Overally I agree, its a stupid decision as it draws a virtual limit within the language. Practically, it shouldn't lead to many bugs, as objects should never be compared with &amp;quot;==&amp;quot;.&lt;br&gt;&lt;br&gt;Messi&lt;br&gt;&lt;br&gt;P.S.: I think they should have left the whole autoboxing &amp;quot;feature&amp;quot; out...</description></item><item><title>re: JavaOne: Day One</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#182458</link><pubDate>Tue, 13 Jul 2004 22:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:182458</guid><dc:creator>Bernhard Messerer</dc:creator><description>P.P.S.: What's wrong with String.intern()?&lt;br&gt;_Always_ compare objects with equals(), &amp;quot;==&amp;quot; checks for identity... Strings offer the ability to &amp;quot;cache&amp;quot; Strings at the JVM level via intern(),  very good for often used strings... however, you're not forced to use it...&lt;br&gt;&lt;br&gt;Messi</description></item><item><title>Re: Java vs. .NET</title><link>http://blogs.msdn.com/ericgu/archive/2004/06/29/168808.aspx#8572298</link><pubDate>Wed, 04 Jun 2008 02:03:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8572298</guid><dc:creator>Channel 9</dc:creator><description>&lt;p&gt;If by metadata u mean Attributes then the answer is not yet.&lt;/p&gt;
</description></item></channel></rss>