<?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"
	>
<channel>
	<title>Comments on: Recless: A Type Inferring Parse Transform for Erlang (Experimental)</title>
	<atom:link href="http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/feed/" rel="self" type="application/rss+xml" />
	<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/</link>
	<description>Adventures in Open Source Erlang</description>
	<pubDate>Fri, 16 May 2008 04:09:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-12725</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Tue, 27 Feb 2007 17:40:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-12725</guid>
		<description>Mike, I like this idea. Unfortunately, I don't have any time to spend on Recless right now... :(</description>
		<content:encoded><![CDATA[<p>Mike, I like this idea. Unfortunately, I don&#8217;t have any time to spend on Recless right now&#8230; :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-12646</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 27 Feb 2007 07:55:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-12646</guid>
		<description>Hi Yariv,

What do you think about support for

Project.owner.city

as a short for Project.owner.address.city

when the city is unique (not a part of the owner in this case)?

I beleive this became part of some modern languages.

Thanks,
Mike.</description>
		<content:encoded><![CDATA[<p>Hi Yariv,</p>
<p>What do you think about support for</p>
<p>Project.owner.city</p>
<p>as a short for Project.owner.address.city</p>
<p>when the city is unique (not a part of the owner in this case)?</p>
<p>I beleive this became part of some modern languages.</p>
<p>Thanks,<br />
Mike.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobbe</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-2718</link>
		<dc:creator>Tobbe</dc:creator>
		<pubDate>Wed, 13 Dec 2006 08:24:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-2718</guid>
		<description>Looks promising i think. However, I tried the following, but got an error when compiling:


-module(test).                                                                                                                                                
-compile({parse_transform, recless}).                                                                                                                         
                                                                                                                                                              
-export([new/0,upd_street/2]).                                                                                                                                
                                                                                                                                                              
-record(adr, {                                                                                                                                                
          name   = "Bill Smith",                                                                                                                              
          street = "Main street 23",                                                                                                                          
          phone                                                                                                                                               
         }).                                                                                                                                                  
                                                                                                                                                              
new() -&#62; #adr{}.                                                                                                                                              
                                                                                                                                                              
upd_street(A = #adr{}, Street) -&#62;                                                                                                                             
    A.street = Street.  


Also, it would be nice to be able to write: 

upd_street(A, Street) when record(A, adr) -&#62; ....</description>
		<content:encoded><![CDATA[<p>Looks promising i think. However, I tried the following, but got an error when compiling:</p>
<p>-module(test).<br />
-compile({parse_transform, recless}).                                                                                                                         </p>
<p>-export([new/0,upd_street/2]).                                                                                                                                </p>
<p>-record(adr, {<br />
          name   = &#8220;Bill Smith&#8221;,<br />
          street = &#8220;Main street 23&#8243;,<br />
          phone<br />
         }).                                                                                                                                                  </p>
<p>new() -&gt; #adr{}.                                                                                                                                              </p>
<p>upd_street(A = #adr{}, Street) -&gt;<br />
    A.street = Street.  </p>
<p>Also, it would be nice to be able to write: </p>
<p>upd_street(A, Street) when record(A, adr) -&gt; &#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-404</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Fri, 13 Oct 2006 02:39:24 +0000</pubDate>
		<guid isPermaLink="false">#comment-404</guid>
		<description>&lt;p&gt;Yes, Recless lets you do that, with the condition that the &#8216;project&#8217; record has the other records in its default initializers.&lt;/p&gt;

&lt;p&gt;You should also be able to explicity state the nested record types of the root record by writing something such as&lt;/p&gt;

&lt;p&gt;get_name(Project = #project{owner = #person{}}) -&gt; Project.owner.name.&lt;/p&gt;

&lt;p&gt;This is helpful when the record &#8216;project&#8217; doesn&#8217;t initialize the &#8216;owner&#8217; field by default.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Yes, Recless lets you do that, with the condition that the &#8216;project&#8217; record has the other records in its default initializers.</p>
<p>You should also be able to explicity state the nested record types of the root record by writing something such as</p>
<p>get_name(Project = #project{owner = #person{}}) -> Project.owner.name.</p>
<p>This is helpful when the record &#8216;project&#8217; doesn&#8217;t initialize the &#8216;owner&#8217; field by default.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bengt kleberg</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-403</link>
		<dc:creator>bengt kleberg</dc:creator>
		<pubDate>Fri, 13 Oct 2006 02:11:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-403</guid>
		<description>&lt;p&gt;you have an example where
get_name(Person = #person{}) -&gt; Person.name.
does this imply that i can write:
city( Project = #project{} ) -&gt; Project.owner.address.city.
???
if so, then it is a great help.&lt;/p&gt;

&lt;p&gt;however, if i only have access to the top level of the record, then i think you might not have added much to the existing:
name(#person{name=Name) -&gt; Name.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>you have an example where<br />
get_name(Person = #person{}) -> Person.name.<br />
does this imply that i can write:<br />
city( Project = #project{} ) -> Project.owner.address.city.<br />
???<br />
if so, then it is a great help.</p>
<p>however, if i only have access to the top level of the record, then i think you might not have added much to the existing:<br />
name(#person{name=Name) -> Name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-402</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Thu, 12 Oct 2006 21:24:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-402</guid>
		<description>&lt;p&gt;Thanks for the feedback. I can add some logic to recless to remove all runtime checks in guards that don&#8217;t help disambiguate which clause matches a pattern. For example, if you have a function such as&lt;/p&gt;

&lt;p&gt;foo(A = #bar{}, true) -&gt; boing;
foo(A = #bar{}, false) -&gt; blub.&lt;/p&gt;

&lt;p&gt;recless can figure out that the pattern A = #bar{} is purely a type indicator and can therefore remove it from the resulting tree.&lt;/p&gt;

&lt;p&gt;Regarding the last problem you mentioned, I don&#8217;t think off the top of my head this will actually happen, but I will look into it.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback. I can add some logic to recless to remove all runtime checks in guards that don&#8217;t help disambiguate which clause matches a pattern. For example, if you have a function such as</p>
<p>foo(A = #bar{}, true) -> boing;<br />
foo(A = #bar{}, false) -> blub.</p>
<p>recless can figure out that the pattern A = #bar{} is purely a type indicator and can therefore remove it from the resulting tree.</p>
<p>Regarding the last problem you mentioned, I don&#8217;t think off the top of my head this will actually happen, but I will look into it.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bengt</title>
		<link>http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/#comment-401</link>
		<dc:creator>Bengt</dc:creator>
		<pubDate>Thu, 12 Oct 2006 12:10:55 +0000</pubDate>
		<guid isPermaLink="false">#comment-401</guid>
		<description>&lt;p&gt;greetings,&lt;/p&gt;

&lt;p&gt;thank you for something that will make records much easier to handle.&lt;/p&gt;

&lt;p&gt;some nitpicking (sorry but you know â€œthose who can not, critiqueâ€ :-)&lt;/p&gt;

&lt;p&gt;accessing a record can be done in 4 ways, not three. you have forgotten the best way:&lt;/p&gt;

address{street=Street} = Address,

&lt;p&gt;the two direct tuple accesses are way to unmaintainable to be considered in a realistic setting.&lt;/p&gt;

&lt;p&gt;the record syntax you use is maintainable, but doing it like in the
above example will include a runtime check that Address is a #address{}.
the way you showed does not check. ie, the following code will work (but probably not as intended):
Project = #project{name=â€Project1â€},
Street = Project#adress.street,
â€œProject1â€ = Street.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>greetings,</p>
<p>thank you for something that will make records much easier to handle.</p>
<p>some nitpicking (sorry but you know â€œthose who can not, critiqueâ€ :-)</p>
<p>accessing a record can be done in 4 ways, not three. you have forgotten the best way:</p>
<p>address{street=Street} = Address,</p>
<p>the two direct tuple accesses are way to unmaintainable to be considered in a realistic setting.</p>
<p>the record syntax you use is maintainable, but doing it like in the<br />
above example will include a runtime check that Address is a #address{}.<br />
the way you showed does not check. ie, the following code will work (but probably not as intended):<br />
Project = #project{name=â€Project1â€},<br />
Street = Project#adress.street,<br />
â€œProject1â€ = Street.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
