<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Scala needs its own ecosystem</title>
	<atom:link href="http://andreasjacobsen.com/2008/10/27/scala-needs-its-own-ecosystem/feed/" rel="self" type="application/rss+xml" />
	<link>http://andreasjacobsen.com/2008/10/27/scala-needs-its-own-ecosystem/</link>
	<description>Another cause of procrastination</description>
	<lastBuildDate>Fri, 02 Jul 2010 06:05:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Erik Engbrecht</title>
		<link>http://andreasjacobsen.com/2008/10/27/scala-needs-its-own-ecosystem/#comment-41</link>
		<dc:creator>Erik Engbrecht</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://andreasjacobsen.wordpress.com/?p=51#comment-41</guid>
		<description>I think you may be seeing a problem where there is none.  A common Scala idiom is the &quot;Pimp my library&quot; pattern.  Basically you use implicit conversions to add methods to classes.  This results in a new object being created, typically one that wraps the original object, for each pimped method.

This has nasty side-effects, as you can see with the RichString example.  It also incurs a non-trivial performance penalty by allocating lots of little thowaway objects.  I don&#039;t know exactly how he will do it, but I believe Martin is going to allow this pattern (or what this pattern achieves) without creating the temporary objects.  This is good for library interoperability in general, as well as performance, not just Java interop.

A better example of what you&#039;re talking about would be the compiler magic performed to make arrays look like parameterized type and be compatible with Java.

A counter example would be raw types.  Scala does not support raw types, even though this damages Java interop.

But I agree that Scala needs its own ecosystem.</description>
		<content:encoded><![CDATA[<p>I think you may be seeing a problem where there is none.  A common Scala idiom is the &#8220;Pimp my library&#8221; pattern.  Basically you use implicit conversions to add methods to classes.  This results in a new object being created, typically one that wraps the original object, for each pimped method.</p>
<p>This has nasty side-effects, as you can see with the RichString example.  It also incurs a non-trivial performance penalty by allocating lots of little thowaway objects.  I don&#8217;t know exactly how he will do it, but I believe Martin is going to allow this pattern (or what this pattern achieves) without creating the temporary objects.  This is good for library interoperability in general, as well as performance, not just Java interop.</p>
<p>A better example of what you&#8217;re talking about would be the compiler magic performed to make arrays look like parameterized type and be compatible with Java.</p>
<p>A counter example would be raw types.  Scala does not support raw types, even though this damages Java interop.</p>
<p>But I agree that Scala needs its own ecosystem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://andreasjacobsen.com/2008/10/27/scala-needs-its-own-ecosystem/#comment-40</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Mon, 27 Oct 2008 16:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://andreasjacobsen.wordpress.com/?p=51#comment-40</guid>
		<description>Scala&#039;s == compiles down to Java&#039;s .equals, except where the resulting bytecode is comparing primitives.

Java&#039;s .equals has Object as its type, therefore RichString.equals(String) is quite valid, though if RichString is sanely implemented, that will always return false (note the symmetry clause in Java&#039;s equals contract).

The specific reason you might accidentally compare a RichString to a String is that you invoked an implicit conversion.  If the type of == was changed so that a T could only be compared to a T or subtype of T, then the compiler would be better-placed to convert the RichString back to String.  Sadly, Scala is unlikely to make large backward-incompatible changes now, so this change won&#039;t happen; or if it does the old behaviour will still be accessible via command-line switches.</description>
		<content:encoded><![CDATA[<p>Scala&#8217;s == compiles down to Java&#8217;s .equals, except where the resulting bytecode is comparing primitives.</p>
<p>Java&#8217;s .equals has Object as its type, therefore RichString.equals(String) is quite valid, though if RichString is sanely implemented, that will always return false (note the symmetry clause in Java&#8217;s equals contract).</p>
<p>The specific reason you might accidentally compare a RichString to a String is that you invoked an implicit conversion.  If the type of == was changed so that a T could only be compared to a T or subtype of T, then the compiler would be better-placed to convert the RichString back to String.  Sadly, Scala is unlikely to make large backward-incompatible changes now, so this change won&#8217;t happen; or if it does the old behaviour will still be accessible via command-line switches.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
