<?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: The Need for a Common Compiler Framework</title>
	<atom:link href="http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework</link>
	<description>(permanently in beta)</description>
	<lastBuildDate>Sun, 29 Aug 2010 20:01:44 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3782</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Thu, 26 Jun 2008 13:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3782</guid>
		<description>Go for it!  I&#039;d be glad to help out where I can with the idea, but to be honest, you probably understand the problem domain much better than I do.  :-)</description>
		<content:encoded><![CDATA[<p>Go for it!  I&#8217;d be glad to help out where I can with the idea, but to be honest, you probably understand the problem domain much better than I do.  <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andres Almiray</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3781</link>
		<dc:creator>Andres Almiray</dc:creator>
		<pubDate>Tue, 24 Jun 2008 23:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3781</guid>
		<description>It was probably that JSR, I wasn&#039;t so sure about it actual contents but knew it was compiler related. I guess now is the time for the JCP, openJDK and/or MVM groups to look into a compiler framework with better eyes. I&#039;m in the Bay Area so a quick trip to Santa Clara is no big deal, I&#039;m no compiler expert but I can surely give it a try. Or we can also send a message to Charles Nutter, he seems pretty excited about collaboration between JVM languages after all =)</description>
		<content:encoded><![CDATA[<p>It was probably that JSR, I wasn&#8217;t so sure about it actual contents but knew it was compiler related. I guess now is the time for the JCP, openJDK and/or MVM groups to look into a compiler framework with better eyes. I&#8217;m in the Bay Area so a quick trip to Santa Clara is no big deal, I&#8217;m no compiler expert but I can surely give it a try. Or we can also send a message to Charles Nutter, he seems pretty excited about collaboration between JVM languages after all =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3780</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Tue, 24 Jun 2008 08:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3780</guid>
		<description>Whew!  Starting from the top and working my way down...

@David

Interesting notes about scalac in trunk/  I&#039;ll have to build myself a copy and give it a try.  What&#039;s really interesting about this solution is it basically implements Adrian&#039;s idea of a linker of sorts.  It also solves probably the biggest problem with joint compilation, which is having to reimplement an already well-vetted compiler.

The problem is that this still isn&#039;t a very general solution: it only works for Scala and Java.  Groovy and the rest are still left out in the cold.  Granted, it would be possible to build such a &quot;stub generator&quot; for Groovy as well as Java, but then what about users who want to go the other way?  More and more these days, people want to &quot;mix and match&quot; their languages.  I&#039;m almost completely convinced that the only way to accommodate this need is with a generic framework.  This framework *could* be based on the generation of stubs and compiler delegation, but why not go all-in and make every compilation process potentially-joint?

@Vidar

Yeah, language designers are quite the rebellious lot.  I suppose I had never thought about it before, but it makes sense.  After all, why would you create your own language if you didn&#039;t already have a bit of a non-conformist streak?

The thing is, I&#039;m really not sure if there&#039;s much of a choice in this matter.  Whether we go with a framework like I have outlined, or some other (preferably better) solution, it doesn&#039;t matter.  We really need to have some sort of interplay between the different compilers, otherwise would-be adopters are going to be permanently tearing their collective hair out over the pain involved.  You&#039;re quite correct that it is a difficult problem to solve.  If all of the JVM languages shared a common paradigm then perhaps it would be simpler, but we have to be a bit more flexible than that.

The good news is that some of the smartest people in the entire development community are involved in language design these days.  I have every confidence in their ability to come up with something extraordinarily clever to solve this issue.  It&#039;s probably just a matter of them recognizing that the need exists.

@Richard

You&#039;re right that *object-oriented* languages can avoid circular dependencies by abstracting out a common superclass and thus breaking the dependent chain.  However, this is a *lot* more work and it often feels unnaturally contrived.  Furthermore, not every JVM language sports object-oriented constructs.  Clojure (for example) is pure-functional.  A circular dependency could be solved as long as a maximum of one of the languages involved is non-OO.  After that point, such a solution breaks down.

@Andres

I actually haven&#039;t tried Groovy&#039;s generics at all, I was simply parroting what I&#039;ve heard others say.  :-)  Actually, I think it was Danno himself that mentioned having troubles with Groovy and generics, but it would have been some time ago.  Hmm...

I looked around for any compiler-related JSRs, but only found the Java 6 compiler API (JSR 299 or something like that).  That&#039;s just a mechanism for interacting with the compiler programmatically, it&#039;s not really a *compiler* framework, designed for use in the construction of compilers.  To which JSR were you referring?

The Da Vinci Machine conference would be fun, but I&#039;m afraid there&#039;s just no way I could attend.  However, if someone else thinks the idea is worthy of theft and re-presentation, I have no objections!  :-)  I think everyone would benefit if *some* solution to this problem were to be proposed.</description>
		<content:encoded><![CDATA[<p>Whew!  Starting from the top and working my way down&#8230;</p>
<p>@David</p>
<p>Interesting notes about scalac in trunk/  I&#8217;ll have to build myself a copy and give it a try.  What&#8217;s really interesting about this solution is it basically implements Adrian&#8217;s idea of a linker of sorts.  It also solves probably the biggest problem with joint compilation, which is having to reimplement an already well-vetted compiler.</p>
<p>The problem is that this still isn&#8217;t a very general solution: it only works for Scala and Java.  Groovy and the rest are still left out in the cold.  Granted, it would be possible to build such a &#8220;stub generator&#8221; for Groovy as well as Java, but then what about users who want to go the other way?  More and more these days, people want to &#8220;mix and match&#8221; their languages.  I&#8217;m almost completely convinced that the only way to accommodate this need is with a generic framework.  This framework *could* be based on the generation of stubs and compiler delegation, but why not go all-in and make every compilation process potentially-joint?</p>
<p>@Vidar</p>
<p>Yeah, language designers are quite the rebellious lot.  I suppose I had never thought about it before, but it makes sense.  After all, why would you create your own language if you didn&#8217;t already have a bit of a non-conformist streak?</p>
<p>The thing is, I&#8217;m really not sure if there&#8217;s much of a choice in this matter.  Whether we go with a framework like I have outlined, or some other (preferably better) solution, it doesn&#8217;t matter.  We really need to have some sort of interplay between the different compilers, otherwise would-be adopters are going to be permanently tearing their collective hair out over the pain involved.  You&#8217;re quite correct that it is a difficult problem to solve.  If all of the JVM languages shared a common paradigm then perhaps it would be simpler, but we have to be a bit more flexible than that.</p>
<p>The good news is that some of the smartest people in the entire development community are involved in language design these days.  I have every confidence in their ability to come up with something extraordinarily clever to solve this issue.  It&#8217;s probably just a matter of them recognizing that the need exists.</p>
<p>@Richard</p>
<p>You&#8217;re right that *object-oriented* languages can avoid circular dependencies by abstracting out a common superclass and thus breaking the dependent chain.  However, this is a *lot* more work and it often feels unnaturally contrived.  Furthermore, not every JVM language sports object-oriented constructs.  Clojure (for example) is pure-functional.  A circular dependency could be solved as long as a maximum of one of the languages involved is non-OO.  After that point, such a solution breaks down.</p>
<p>@Andres</p>
<p>I actually haven&#8217;t tried Groovy&#8217;s generics at all, I was simply parroting what I&#8217;ve heard others say.  <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   Actually, I think it was Danno himself that mentioned having troubles with Groovy and generics, but it would have been some time ago.  Hmm&#8230;</p>
<p>I looked around for any compiler-related JSRs, but only found the Java 6 compiler API (JSR 299 or something like that).  That&#8217;s just a mechanism for interacting with the compiler programmatically, it&#8217;s not really a *compiler* framework, designed for use in the construction of compilers.  To which JSR were you referring?</p>
<p>The Da Vinci Machine conference would be fun, but I&#8217;m afraid there&#8217;s just no way I could attend.  However, if someone else thinks the idea is worthy of theft and re-presentation, I have no objections!  <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   I think everyone would benefit if *some* solution to this problem were to be proposed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevion</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3778</link>
		<dc:creator>Trevion</dc:creator>
		<pubDate>Mon, 23 Jun 2008 23:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3778</guid>
		<description>I think some group of people already MAKE a program that MAKEs complicated build processes involving multiple build programs easier to create and manage.  You might find such a thing MAKEs the dependencies on different compilers not as much of an issue.</description>
		<content:encoded><![CDATA[<p>I think some group of people already MAKE a program that MAKEs complicated build processes involving multiple build programs easier to create and manage.  You might find such a thing MAKEs the dependencies on different compilers not as much of an issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3777</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Mon, 23 Jun 2008 19:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3777</guid>
		<description>All these VM&#039;s and IL&#039;s make me feel like all we did was re-create the wheel of something already done just on a somewhat lower level.</description>
		<content:encoded><![CDATA[<p>All these VM&#8217;s and IL&#8217;s make me feel like all we did was re-create the wheel of something already done just on a somewhat lower level.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Barooah</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3776</link>
		<dc:creator>Robin Barooah</dc:creator>
		<pubDate>Mon, 23 Jun 2008 16:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3776</guid>
		<description>I like the idea of a common compiler framework.  It could be useful for more than just compilation - but for tool building in general.  For instance, I&#039;d like to be able to get a programmatic representation of the class hierarchy, or the dependency graph between files in either scala or java.  Clearly the compiler is the arbiter of such information and it would be nice to have an API to gain access to it for tool construction.

Does eclipse define such APIs for JDT?</description>
		<content:encoded><![CDATA[<p>I like the idea of a common compiler framework.  It could be useful for more than just compilation &#8211; but for tool building in general.  For instance, I&#8217;d like to be able to get a programmatic representation of the class hierarchy, or the dependency graph between files in either scala or java.  Clearly the compiler is the arbiter of such information and it would be nice to have an API to gain access to it for tool construction.</p>
<p>Does eclipse define such APIs for JDT?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andres Almiray</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3775</link>
		<dc:creator>Andres Almiray</dc:creator>
		<pubDate>Mon, 23 Jun 2008 16:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3775</guid>
		<description>Hi Daniel, good write up! but I&#039;m not sure what you mean about Groovy + generics falling short, AFAIK generics support is there already since 1.5, Besides Groovy 1.5+ also supports annotations and enums (haven&#039;t checked yet if Scala supports them directly or has an alternative).

What you describe here is called the joint-compiler, funny you talk about Java+Groovy+Scala compiler, Danno Ferrin (a.k.a. @shemnon) pitched the same idea ta JavaOne =) I believe there is already a compiler framework JSR (not exactly the fastest way to have it done), but it makes total sense (at least to me) to have a common ground to compile JVM languages together in a &quot;single step&quot;. Why not propose this topic to the upcoming DaVinci VM conference?</description>
		<content:encoded><![CDATA[<p>Hi Daniel, good write up! but I&#8217;m not sure what you mean about Groovy + generics falling short, AFAIK generics support is there already since 1.5, Besides Groovy 1.5+ also supports annotations and enums (haven&#8217;t checked yet if Scala supports them directly or has an alternative).</p>
<p>What you describe here is called the joint-compiler, funny you talk about Java+Groovy+Scala compiler, Danno Ferrin (a.k.a. @shemnon) pitched the same idea ta JavaOne =) I believe there is already a compiler framework JSR (not exactly the fastest way to have it done), but it makes total sense (at least to me) to have a common ground to compile JVM languages together in a &#8220;single step&#8221;. Why not propose this topic to the upcoming DaVinci VM conference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3774</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Mon, 23 Jun 2008 16:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3774</guid>
		<description>&gt; So how does it work presently in the .Net universe?
Same problem (in the normal case). Each compile generates an assembly, and you can&#039;t have circular dependencies between assemblies.

You can create multi-language assemblies by building &quot;modules&quot; and then merging them, but IIRC you have the same inability to have circular references between different modules.

But then how often do you really have such circular dependencies that cannot be broken by having Canvas (for example) dependent on RectangleBase and CircleBase rather than their concrete implementations.</description>
		<content:encoded><![CDATA[<p>&gt; So how does it work presently in the .Net universe?<br />
Same problem (in the normal case). Each compile generates an assembly, and you can&#8217;t have circular dependencies between assemblies.</p>
<p>You can create multi-language assemblies by building &#8220;modules&#8221; and then merging them, but IIRC you have the same inability to have circular references between different modules.</p>
<p>But then how often do you really have such circular dependencies that cannot be broken by having Canvas (for example) dependent on RectangleBase and CircleBase rather than their concrete implementations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vidar Hokstad</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3773</link>
		<dc:creator>Vidar Hokstad</dc:creator>
		<pubDate>Mon, 23 Jun 2008 15:42:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3773</guid>
		<description>Maybe this would work within the JVM-world or the CLR-world, but even there part of the problem is that mapping arbitrary programming languages onto them is hard - conforming to these runtimes means making sacrifices which many people aren&#039;t prepared to (such as me, being one of those weirdo&#039;s writing compilers targeting x86 directly - it&#039;s not that hard, but I do plan on abstracting it out).

But even on the JVM, part of the problem will be that language architects deep down tend to be anarchists - just look at the sheer number of parser generators. Sometimes it seems there are more parser generators than languages, since most serious language designers tends to write his/her own sooner or later, and often more than one, because so many of us hate the existing tools with a vengeance (I certainly do, including my own, so I keep striving for something nicer).

GCC sort of gets there. LLVM might also sort of get there. But they are complex beasts, and making it possible to support multiple languages with them pages it harder to keep them lean.

But frankly you don&#039;t NEED a common compiler framework. All you need are a few narrow standardized interfaces to encapsulate calling a compiler, manipulating the resulting bytecode, and to query the classes. Java already have a lot of reflection support, so you&#039;re sort-of halfway there.

Libraries for some things like emitting bytecode could certainly be reused, though, but even there you&#039;re likely to run into vastly different philosophies on what the right way to do it is between compiler implementors.

Vidar</description>
		<content:encoded><![CDATA[<p>Maybe this would work within the JVM-world or the CLR-world, but even there part of the problem is that mapping arbitrary programming languages onto them is hard &#8211; conforming to these runtimes means making sacrifices which many people aren&#8217;t prepared to (such as me, being one of those weirdo&#8217;s writing compilers targeting x86 directly &#8211; it&#8217;s not that hard, but I do plan on abstracting it out).</p>
<p>But even on the JVM, part of the problem will be that language architects deep down tend to be anarchists &#8211; just look at the sheer number of parser generators. Sometimes it seems there are more parser generators than languages, since most serious language designers tends to write his/her own sooner or later, and often more than one, because so many of us hate the existing tools with a vengeance (I certainly do, including my own, so I keep striving for something nicer).</p>
<p>GCC sort of gets there. LLVM might also sort of get there. But they are complex beasts, and making it possible to support multiple languages with them pages it harder to keep them lean.</p>
<p>But frankly you don&#8217;t NEED a common compiler framework. All you need are a few narrow standardized interfaces to encapsulate calling a compiler, manipulating the resulting bytecode, and to query the classes. Java already have a lot of reflection support, so you&#8217;re sort-of halfway there.</p>
<p>Libraries for some things like emitting bytecode could certainly be reused, though, but even there you&#8217;re likely to run into vastly different philosophies on what the right way to do it is between compiler implementors.</p>
<p>Vidar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Heon</title>
		<link>http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework/comment-page-1#comment-3772</link>
		<dc:creator>Jeff Heon</dc:creator>
		<pubDate>Mon, 23 Jun 2008 14:00:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/java/the-need-for-a-common-compiler-framework#comment-3772</guid>
		<description>So how does it work presently in the .Net universe?

I&#039;m pretty sure there is no problem mixing vb.net and C#, but of course they were both developed knowing they would be mixed/

Languages like IronPython and the like would have the same problem then?</description>
		<content:encoded><![CDATA[<p>So how does it work presently in the .Net universe?</p>
<p>I&#8217;m pretty sure there is no problem mixing vb.net and C#, but of course they were both developed knowing they would be mixed/</p>
<p>Languages like IronPython and the like would have the same problem then?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
