<?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: Zero is a number	</title>
	<atom:link href="http://matteo.vaccari.name/blog/archives/438/feed" rel="self" type="application/rss+xml" />
	<link>http://matteo.vaccari.name/blog/archives/438</link>
	<description>Extreme enthusiasm</description>
	<lastBuildDate>
	Mon, 25 Feb 2019 15:18:16 +0000	</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.1.1</generator>
			<item>
				<title>
				By: Indrit				</title>
				<link>http://matteo.vaccari.name/blog/archives/438/comment-page-1#comment-93525</link>
		<dc:creator><![CDATA[Indrit]]></dc:creator>
		<pubDate>Tue, 12 Oct 2010 12:53:59 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=438#comment-93525</guid>
					<description><![CDATA[Hi Matteo,

of course I fully agree with your observations but (here I&#039;m going a little off-topic) I think it&#039;s very difficult to avoid the 0 check on Java. Yes, theoretically a developer must never return null but this is a convention, there are no built-in rules in the language (you can make use of jsr-305 but that is not 100% bulletproof). How one can be sure that a method returns always an empty list? If you hold the control on code it&#039;s perfectly ok, otherwise you can read the source code but what if the implementation changes? I have learned a lot of things reading java.util.Collections class which I think in this respect is a jewel.]]></description>
		<content:encoded><![CDATA[<p>Hi Matteo,</p>
<p>of course I fully agree with your observations but (here I&#8217;m going a little off-topic) I think it&#8217;s very difficult to avoid the 0 check on Java. Yes, theoretically a developer must never return null but this is a convention, there are no built-in rules in the language (you can make use of jsr-305 but that is not 100% bulletproof). How one can be sure that a method returns always an empty list? If you hold the control on code it&#8217;s perfectly ok, otherwise you can read the source code but what if the implementation changes? I have learned a lot of things reading java.util.Collections class which I think in this respect is a jewel.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Moreno Carullo				</title>
				<link>http://matteo.vaccari.name/blog/archives/438/comment-page-1#comment-93453</link>
		<dc:creator><![CDATA[Moreno Carullo]]></dc:creator>
		<pubDate>Fri, 27 Aug 2010 08:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=438#comment-93453</guid>
					<description><![CDATA[I totally agree with Vieri: IMHO this is a specific instance of the NullObject way of thinking about OO messages ;)]]></description>
		<content:encoded><![CDATA[<p>I totally agree with Vieri: IMHO this is a specific instance of the NullObject way of thinking about OO messages ;)</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Vieri del Bianco				</title>
				<link>http://matteo.vaccari.name/blog/archives/438/comment-page-1#comment-93432</link>
		<dc:creator><![CDATA[Vieri del Bianco]]></dc:creator>
		<pubDate>Fri, 06 Aug 2010 14:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=438#comment-93432</guid>
					<description><![CDATA[I completely agree!

And you can even push it a little bit forward: some times you need to create and return a NullObject instead of simple null. But since this would mean adding code and complexity (a new class), it is to be used only if and when it is really needed.

Some references to the NullObject design pattern:
http://www.cs.oberlin.edu/~jwalker/nullObjPattern/
http://www.refactoring.com/catalog/introduceNullObject.html
http://martinfowler.com/eaaCatalog/specialCase.html]]></description>
		<content:encoded><![CDATA[<p>I completely agree!</p>
<p>And you can even push it a little bit forward: some times you need to create and return a NullObject instead of simple null. But since this would mean adding code and complexity (a new class), it is to be used only if and when it is really needed.</p>
<p>Some references to the NullObject design pattern:<br />
<a href="http://www.cs.oberlin.edu/~jwalker/nullObjPattern/" rel="nofollow">http://www.cs.oberlin.edu/~jwalker/nullObjPattern/</a><br />
<a href="http://www.refactoring.com/catalog/introduceNullObject.html" rel="nofollow">http://www.refactoring.com/catalog/introduceNullObject.html</a><br />
<a href="http://martinfowler.com/eaaCatalog/specialCase.html" rel="nofollow">http://martinfowler.com/eaaCatalog/specialCase.html</a></p>
]]></content:encoded>
						</item>
			</channel>
</rss>
