<?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: Avoid using nulls in Scala</title> <atom:link href="http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html/feed" rel="self" type="application/rss+xml" /><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html</link> <description>Against the grain software and startups</description> <lastBuildDate>Wed, 04 Apr 2012 19:38:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Gabriel Claramunt</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-94</link> <dc:creator>Gabriel Claramunt</dc:creator> <pubDate>Sun, 14 Feb 2010 15:29:14 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-94</guid> <description>&lt;p&gt;I think everybody agrees that null is a big wart in the Scala&#039;s type system but is there for Java compatibility. As you said, idiomatic Scala uses Option[T] instead. Nulls are a runtime event, so the compiler cannot infer much, ( unless you use Option :)) In this particular case, maybe WrappedString should throw a &quot;null parameter exception&quot; or check for null in isEmpty, but I agree that implicits can have nasty interactions with nulls. bottom line: nulls are bad, mmmmkay?&lt;/p&gt; </description> <content:encoded><![CDATA[<p>I think everybody agrees that null is a big wart in the Scala&#8217;s type system but is there for Java compatibility. As you said, idiomatic Scala uses Option[T] instead. Nulls are a runtime event, so the compiler cannot infer much, ( unless you use Option <img src='http://ilyasterin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) In this particular case, maybe WrappedString should throw a &#8220;null parameter exception&#8221; or check for null in isEmpty, but I agree that implicits can have nasty interactions with nulls. bottom line: nulls are bad, mmmmkay?</p> ]]></content:encoded> </item> <item><title>By: Gabriel Claramunt</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-229</link> <dc:creator>Gabriel Claramunt</dc:creator> <pubDate>Sun, 14 Feb 2010 15:29:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-229</guid> <description>&lt;p&gt;I think everybody agrees that null is a big wart in the Scala&#039;s type system but is there for Java compatibility. As you said, idiomatic Scala uses Option[T] instead. Nulls are a runtime event, so the compiler cannot infer much, ( unless you use Option :)) In this particular case, maybe WrappedString should throw a &quot;null parameter exception&quot; or check for null in isEmpty, but I agree that implicits can have nasty interactions with nulls. bottom line: nulls are bad, mmmmkay?&lt;/p&gt; </description> <content:encoded><![CDATA[<p>I think everybody agrees that null is a big wart in the Scala&#8217;s type system but is there for Java compatibility. As you said, idiomatic Scala uses Option[T] instead. Nulls are a runtime event, so the compiler cannot infer much, ( unless you use Option <img src='http://ilyasterin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) In this particular case, maybe WrappedString should throw a &#8220;null parameter exception&#8221; or check for null in isEmpty, but I agree that implicits can have nasty interactions with nulls. bottom line: nulls are bad, mmmmkay?</p> ]]></content:encoded> </item> <item><title>By: Ilya Sterin</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-93</link> <dc:creator>Ilya Sterin</dc:creator> <pubDate>Thu, 11 Feb 2010 08:54:05 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-93</guid> <description>&lt;p&gt;Yes that&#039;s a good option, but being that anyone can use implicits I wonder if this check shouldn&#039;t be done by the compiler? I can&#039;t think of any reason why one would want an implicit to wrap a null. With this being a compiler check it will prevent any surprises from 3rd party defined implicits.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>Yes that&#8217;s a good option, but being that anyone can use implicits I wonder if this check shouldn&#8217;t be done by the compiler? I can&#8217;t think of any reason why one would want an implicit to wrap a null. With this being a compiler check it will prevent any surprises from 3rd party defined implicits.</p> ]]></content:encoded> </item> <item><title>By: Ilya Sterin</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-228</link> <dc:creator>Ilya Sterin</dc:creator> <pubDate>Thu, 11 Feb 2010 08:54:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-228</guid> <description>&lt;p&gt;Yes that&#039;s a good option, but being that anyone can use implicits I wonder if this check shouldn&#039;t be done by the compiler? I can&#039;t think of any reason why one would want an implicit to wrap a null. With this being a compiler check it will prevent any surprises from 3rd party defined implicits.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>Yes that&#8217;s a good option, but being that anyone can use implicits I wonder if this check shouldn&#8217;t be done by the compiler? I can&#8217;t think of any reason why one would want an implicit to wrap a null. With this being a compiler check it will prevent any surprises from 3rd party defined implicits.</p> ]]></content:encoded> </item> <item><title>By: Martin</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-92</link> <dc:creator>Martin</dc:creator> <pubDate>Thu, 11 Feb 2010 07:58:12 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-92</guid> <description>&lt;p&gt;I tend to agree; implicit wrappers need to check that they apply only to non-null values. That needs to be done in the classes defining those wrappers.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>I tend to agree; implicit wrappers need to check that they apply only to non-null values. That needs to be done in the classes defining those wrappers.</p> ]]></content:encoded> </item> <item><title>By: Martin</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-227</link> <dc:creator>Martin</dc:creator> <pubDate>Thu, 11 Feb 2010 07:58:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-227</guid> <description>&lt;p&gt;I tend to agree; implicit wrappers need to check that they apply only to non-null values. That needs to be done in the classes defining those wrappers.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>I tend to agree; implicit wrappers need to check that they apply only to non-null values. That needs to be done in the classes defining those wrappers.</p> ]]></content:encoded> </item> <item><title>By: mr.x</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-91</link> <dc:creator>mr.x</dc:creator> <pubDate>Thu, 11 Feb 2010 07:21:31 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-91</guid> <description>&lt;p&gt;That implicit conversion makes no sense.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>That implicit conversion makes no sense.</p> ]]></content:encoded> </item> <item><title>By: mr.x</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-226</link> <dc:creator>mr.x</dc:creator> <pubDate>Thu, 11 Feb 2010 07:21:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-226</guid> <description>&lt;p&gt;That implicit conversion makes no sense.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>That implicit conversion makes no sense.</p> ]]></content:encoded> </item> <item><title>By: Sakuraba</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-90</link> <dc:creator>Sakuraba</dc:creator> <pubDate>Thu, 11 Feb 2010 05:47:27 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-90</guid> <description>&lt;p&gt;In my mind the implicit conversion is the bug. A null-reference String should not be turned into a WrappedString that is no longer null. If that was the case, there would not be any unexpected behaviour.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>In my mind the implicit conversion is the bug. A null-reference String should not be turned into a WrappedString that is no longer null. If that was the case, there would not be any unexpected behaviour.</p> ]]></content:encoded> </item> <item><title>By: Sakuraba</title><link>http://ilyasterin.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-225</link> <dc:creator>Sakuraba</dc:creator> <pubDate>Thu, 11 Feb 2010 05:47:00 +0000</pubDate> <guid isPermaLink="false">http://ilya.cobrio.com/blog/2010/02/avoid-using-nulls-in-scala.html#comment-225</guid> <description>&lt;p&gt;In my mind the implicit conversion is the bug. A null-reference String should not be turned into a WrappedString that is no longer null. If that was the case, there would not be any unexpected behaviour.&lt;/p&gt; </description> <content:encoded><![CDATA[<p>In my mind the implicit conversion is the bug. A null-reference String should not be turned into a WrappedString that is no longer null. If that was the case, there would not be any unexpected behaviour.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using memcached

Served from: ilyasterin.com @ 2012-05-19 06:37:47 -->
