<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Q: What Sucks More Than Java Generics?</title>
	<link>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/</link>
	<description>A man needs a little madness, or else he never dares cut the rope and be free. -Nikos Kazantzakis</description>
	<pubDate>Wed, 07 Jan 2009 02:31:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Peter Lawrey</title>
		<link>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/#comment-57133</link>
		<author>Peter Lawrey</author>
		<pubDate>Wed, 27 Feb 2008 21:19:20 +0000</pubDate>
		<guid>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/#comment-57133</guid>
		<description>I'm a fan of Generic but there are some things about them I find dumb.

e.g.
Class&#60;Class&#62; clazz = Class.class; // compiles ok.
Class&#60;Class&#62; clazz = Class.class.getClass(); // requires a cast and gets a warning.

Map&#60;?, ?&#62; map;
for(Entry&#60;?, ?&#62; entry: map.entrySet()) // compiles ok.

Map map;
for(Entry entry: map.entrySet()) // requires a cast.

Set set = new HashSet&#60;Integer&#62;(); // ok.
Set&#60;Set&#62; setOfSet = new HashSet&#60;Set&#60;Integer&#62;&#62;(); // requires type erasure.</description>
		<content:encoded><![CDATA[<p>I&#8217;m a fan of Generic but there are some things about them I find dumb.</p>
<p>e.g.<br />
Class&lt;Class&gt; clazz = Class.class; // compiles ok.<br />
Class&lt;Class&gt; clazz = Class.class.getClass(); // requires a cast and gets a warning.</p>
<p>Map&lt;?, ?&gt; map;<br />
for(Entry&lt;?, ?&gt; entry: map.entrySet()) // compiles ok.</p>
<p>Map map;<br />
for(Entry entry: map.entrySet()) // requires a cast.</p>
<p>Set set = new HashSet&lt;Integer&gt;(); // ok.<br />
Set&lt;Set&gt; setOfSet = new HashSet&lt;Set&lt;Integer&gt;&gt;(); // requires type erasure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/#comment-57111</link>
		<author>Jason</author>
		<pubDate>Wed, 27 Feb 2008 18:13:07 +0000</pubDate>
		<guid>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/#comment-57111</guid>
		<description>Hi Taylor,

I think it is also just human nature to take for granted what you've got and complain about what you haven't got.  Complaints about the weak points of generics are fine: they are far from perfect.  What I don't like is when the addition of generics to the language is painted as an abject failure.  The reality is the current implementation solves a lot of common problems from the pre-5 days, i.e. a step in the right direction.</description>
		<content:encoded><![CDATA[<p>Hi Taylor,</p>
<p>I think it is also just human nature to take for granted what you&#8217;ve got and complain about what you haven&#8217;t got.  Complaints about the weak points of generics are fine: they are far from perfect.  What I don&#8217;t like is when the addition of generics to the language is painted as an abject failure.  The reality is the current implementation solves a lot of common problems from the pre-5 days, i.e. a step in the right direction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taylor</title>
		<link>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/#comment-57103</link>
		<author>Taylor</author>
		<pubDate>Wed, 27 Feb 2008 16:49:23 +0000</pubDate>
		<guid>http://www.alittlemadness.com/2008/02/27/q-what-sucks-more-than-java-generics/#comment-57103</guid>
		<description>True, I'm afraid the arguments always focus on the library developer, rather than the api consumer.  As a consumer, generics are great, you know what you're getting, less type casting, etc.</description>
		<content:encoded><![CDATA[<p>True, I&#8217;m afraid the arguments always focus on the library developer, rather than the api consumer.  As a consumer, generics are great, you know what you&#8217;re getting, less type casting, etc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
