<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A Syntax Trick I Was Not Aware Of</title>
	<atom:link href="http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/feed/" rel="self" type="application/rss+xml" />
	<link>http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/</link>
	<description>Technology and Geek Stuff by Eric Burke</description>
	<lastBuildDate>Sat, 27 Feb 2010 14:52:46 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Fred</title>
		<link>http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/comment-page-1/#comment-1330</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Mon, 12 Nov 2007 22:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/#comment-1330</guid>
		<description>After reading all this energy to save inference, I wrote an entry to save Explicit Type Parameters ;-)
The Ugly Duckling of Java!</description>
		<content:encoded><![CDATA[<p>After reading all this energy to save inference, I wrote an entry to save Explicit Type Parameters <img src='http://stuffthathappens.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
The Ugly Duckling of Java!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Lee</title>
		<link>http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/comment-page-1/#comment-1161</link>
		<dc:creator>Bob Lee</dc:creator>
		<pubDate>Thu, 08 Nov 2007 22:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/#comment-1161</guid>
		<description>Yeah, no erasure here. Java just isn&#039;t smart enough to infer the generic types in method arguments.  It&#039;s the classic chicken or the egg problem. The compiler needs to know the types of the arguments in order to decide which method to dispatch to, but it also needs to know which method it&#039;s dispatching to in order to infer the type parameters. Like Kevin said, it&#039;s tricky but doable, and it looks like this could be fixed in Java 7.</description>
		<content:encoded><![CDATA[<p>Yeah, no erasure here. Java just isn&#8217;t smart enough to infer the generic types in method arguments.  It&#8217;s the classic chicken or the egg problem. The compiler needs to know the types of the arguments in order to decide which method to dispatch to, but it also needs to know which method it&#8217;s dispatching to in order to infer the type parameters. Like Kevin said, it&#8217;s tricky but doable, and it looks like this could be fixed in Java 7.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/comment-page-1/#comment-1116</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Thu, 08 Nov 2007 06:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/#comment-1116</guid>
		<description>It looks strange at first (some says very ugly) but Neal&#039;s use it all the time.
I found out that it has good logic and solves some issue with Genric woodoo magic.
For example in JPA:
&quot;MyBean = em.find(MyBean.class,pk);&quot;
In Java 5, the casting disappear automatically with no apparent reason. And if you want to hide implementation class and make users use only interface, it does not work anymore.
So,
&quot;MyBean = em.&lt;MyBean&gt;find(persistentClass, pk);&quot;
solves the problem.</description>
		<content:encoded><![CDATA[<p>It looks strange at first (some says very ugly) but Neal&#8217;s use it all the time.<br />
I found out that it has good logic and solves some issue with Genric woodoo magic.<br />
For example in JPA:<br />
&#8220;MyBean = em.find(MyBean.class,pk);&#8221;<br />
In Java 5, the casting disappear automatically with no apparent reason. And if you want to hide implementation class and make users use only interface, it does not work anymore.<br />
So,<br />
&#8220;MyBean = em.&lt;MyBean&gt;find(persistentClass, pk);&#8221;<br />
solves the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Bourrillion</title>
		<link>http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/comment-page-1/#comment-1110</link>
		<dc:creator>Kevin Bourrillion</dc:creator>
		<pubDate>Thu, 08 Nov 2007 04:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://stuffthathappens.com/blog/2007/11/07/a-syntax-trick-i-was-not-aware-of/#comment-1110</guid>
		<description>Annoying, isn&#039;t it.

It&#039;s not to do with erasure, it&#039;s just a weakness in the language; but Neal has said it&#039;s fixable.  You shouldn&#039;t have to either supply that &lt;String&gt; or use a temp var.</description>
		<content:encoded><![CDATA[<p>Annoying, isn&#8217;t it.</p>
<p>It&#8217;s not to do with erasure, it&#8217;s just a weakness in the language; but Neal has said it&#8217;s fixable.  You shouldn&#8217;t have to either supply that &lt;String&gt; or use a temp var.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.254 seconds -->
