<?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: Typesafe DSLs in Java: Part 1 &#8212; Typesafe Bytecode</title>
	<atom:link href="http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/feed/" rel="self" type="application/rss+xml" />
	<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/</link>
	<description>no buzzwords allowed</description>
	<lastBuildDate>Wed, 01 Feb 2012 18:42:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jevgeni Kabanov</title>
		<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/comment-page-1/#comment-206</link>
		<dc:creator>Jevgeni Kabanov</dc:creator>
		<pubDate>Thu, 27 Mar 2008 05:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/#comment-206</guid>
		<description>Alex: I discuss that in &quot;The world isn&#039;t perfect&quot;. Most classes you access are likely to be present and some classes you can access using special placeholders (e.g. Self for the class being constructed). In general case you just have to make some calls not type safe. It will still provide a great deal of benefit to many projects.</description>
		<content:encoded><![CDATA[<p>Alex: I discuss that in &#8220;The world isn&#8217;t perfect&#8221;. Most classes you access are likely to be present and some classes you can access using special placeholders (e.g. Self for the class being constructed). In general case you just have to make some calls not type safe. It will still provide a great deal of benefit to many projects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Popescu</title>
		<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/comment-page-1/#comment-205</link>
		<dc:creator>Alex Popescu</dc:creator>
		<pubDate>Thu, 27 Mar 2008 01:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/#comment-205</guid>
		<description>I don&#039;t think usage of class literals will really work when defining classes, as you may need to refer classes that haven&#039;t been loaded. 

cheers,

./alex
--
.w( the_mindstorm )p.
  Alexandru Popescu</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think usage of class literals will really work when defining classes, as you may need to refer classes that haven&#8217;t been loaded. </p>
<p>cheers,</p>
<p>./alex<br />
&#8211;<br />
.w( the_mindstorm )p.<br />
  Alexandru Popescu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sp3w &#187; Blog Archive &#187; Linkage 2008.03.26 PM</title>
		<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/comment-page-1/#comment-202</link>
		<dc:creator>Sp3w &#187; Blog Archive &#187; Linkage 2008.03.26 PM</dc:creator>
		<pubDate>Wed, 26 Mar 2008 20:01:44 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/#comment-202</guid>
		<description>[...] Typesafe DSLs in Java: Part 1 - Typesafe Bytecode [...]</description>
		<content:encoded><![CDATA[<p>[...] Typesafe DSLs in Java: Part 1 &#8211; Typesafe Bytecode [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jevgeni Kabanov</title>
		<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/comment-page-1/#comment-189</link>
		<dc:creator>Jevgeni Kabanov</dc:creator>
		<pubDate>Tue, 25 Mar 2008 22:04:02 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/#comment-189</guid>
		<description>Oh, and about staying up-to-date -- it&#039;s not a true versioned project at the moment, so this blog is most likely the best place to follow for now.</description>
		<content:encoded><![CDATA[<p>Oh, and about staying up-to-date &#8212; it&#8217;s not a true versioned project at the moment, so this blog is most likely the best place to follow for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jevgeni Kabanov</title>
		<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/comment-page-1/#comment-188</link>
		<dc:creator>Jevgeni Kabanov</dc:creator>
		<pubDate>Tue, 25 Mar 2008 22:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/#comment-188</guid>
		<description>&gt;Like you have invokeVirtualVoid, you’d also 
&gt;have invokeVirtualInt and likewise the other 
&gt;primitive types.

invokeVirtualInt wont work, since ints can appear anywhere in the descriptor, both as arguments and as result. What you can do is declare a Placeholder parametric class, which could take an enum or somesuch and overload the invoke* methods to take either Class or that. You can also just allow giving it as string. Both approaches are viable, but not pretty.

&gt;As for the performance concern of the numerous
&gt;instances...

No I can&#039;t, since the methods must be polymorphic (parametrized) and the only way to do it in Java is to have the particular instance parametrized. If I have the StateObject I&#039;ll lose the type safety (unfortunately). It is possible to make all the methods static (static methods are not polymorphic to the instance), but then I&#039;d need to pass the instance and apply them in reverse order, which again sucks.

&gt;it should provide support for dropping down 
&gt;to “guru level” whenever needed

Of course. That&#039;s partially what assume* exist for.</description>
		<content:encoded><![CDATA[<p>>Like you have invokeVirtualVoid, you’d also<br />
>have invokeVirtualInt and likewise the other<br />
>primitive types.</p>
<p>invokeVirtualInt wont work, since ints can appear anywhere in the descriptor, both as arguments and as result. What you can do is declare a Placeholder parametric class, which could take an enum or somesuch and overload the invoke* methods to take either Class or that. You can also just allow giving it as string. Both approaches are viable, but not pretty.</p>
<p>>As for the performance concern of the numerous<br />
>instances&#8230;</p>
<p>No I can&#8217;t, since the methods must be polymorphic (parametrized) and the only way to do it in Java is to have the particular instance parametrized. If I have the StateObject I&#8217;ll lose the type safety (unfortunately). It is possible to make all the methods static (static methods are not polymorphic to the instance), but then I&#8217;d need to pass the instance and apply them in reverse order, which again sucks.</p>
<p>>it should provide support for dropping down<br />
>to “guru level” whenever needed</p>
<p>Of course. That&#8217;s partially what assume* exist for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Vest Hansen</title>
		<link>http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/comment-page-1/#comment-187</link>
		<dc:creator>Christian Vest Hansen</dc:creator>
		<pubDate>Tue, 25 Mar 2008 21:38:05 +0000</pubDate>
		<guid isPermaLink="false">http://dow.ngra.de/2008/03/24/typesafe-dsls-in-java-part-1-typesafe-bytecode/#comment-187</guid>
		<description>This is certainly interesting. Perhaps you could create a number of methods designed specifically to work on the primitive methods? Like you have invokeVirtualVoid, you&#039;d also have invokeVirtualInt and likewise the other primitive types.

As for the performance concern of the numerous instances, could you not create just a single instance of each of these MethodBuilders, perhaps even lazily, per instance of ClassBuilder, and then pass a StateObject around that contains everything they need to know at each particular call?

I also think Closures are the right way to go about control flow.

Finally, I&#039;d like to say, that some people might want to do some very crazy things with ASM - things your API might not anticipate or allow, so it should provide support for dropping down to &quot;guru level&quot; whenever needed, and give direct access to the Method and ClassWriters.

Oh, and do you have a mailing list, or is the RSS feed for this blog th best way to &quot;stay posted&quot;?</description>
		<content:encoded><![CDATA[<p>This is certainly interesting. Perhaps you could create a number of methods designed specifically to work on the primitive methods? Like you have invokeVirtualVoid, you&#8217;d also have invokeVirtualInt and likewise the other primitive types.</p>
<p>As for the performance concern of the numerous instances, could you not create just a single instance of each of these MethodBuilders, perhaps even lazily, per instance of ClassBuilder, and then pass a StateObject around that contains everything they need to know at each particular call?</p>
<p>I also think Closures are the right way to go about control flow.</p>
<p>Finally, I&#8217;d like to say, that some people might want to do some very crazy things with ASM &#8211; things your API might not anticipate or allow, so it should provide support for dropping down to &#8220;guru level&#8221; whenever needed, and give direct access to the Method and ClassWriters.</p>
<p>Oh, and do you have a mailing list, or is the RSS feed for this blog th best way to &#8220;stay posted&#8221;?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

