<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Joe Armstrong wrote:<br>
<blockquote
 cite="mid9b08084c0705210110o7c24d1f6v966b1c8a57a9b0d3@mail.gmail.com"
 type="cite">
  <pre wrap="">Comments?
  </pre>
</blockquote>
I wonder if better record manipulation could be added to the language.
See
<a class="moz-txt-link-freetext" href="http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/">http://yarivsblog.com/articles/2006/10/11/recless-a-type-inferring-parse-transform-for-erlang-experimental/</a><br>
<br>
Example from tha post:<br>
[quote]<br>
<p>The Erlang record syntax gets even more cumbersome when working with
nested records. Let’s say we want to get the city of the owner of
Project. This is how we go about it using the record syntax:</p>
<p><code><br>
City = ((Project#project.owner)<br>
              #person.address)#address.city<br>
</code></p>
<p>If you think that’s an eyesore, consider *changing* the value of the
city:</p>
<p><code><br>
NewProject =<br>
Project#project{owner =<br>
  (Project#project.owner)#person{address =<br>
     ((Project#project.owner)<br>
        #person.address)#address{city = "Boston"}}}.<br>
</code></p>
<p>Yes, I know. Ugly. That’s why I created Recless.</p>
<p>Recless is a parse transform that uses a type inference algorithm to
figure out what kinds of records your variables are holding, and then
lets you write much less code to work with their elements. For example,
with Recless, the above two examples could be written as</p>
<p><code><br>
City = Project.owner.city.<br>
</code></p>
<p>and </p>
<code><br>
NewProject = Project.owner.address.city = "Boston".</code><br>
[/unquote]<br>
</body>
</html>