<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:"times new roman", "new york", "times", serif;font-size:12pt"><div>In what sense would they grow the language? By adding an abstractisation layer, or by building it in the language.&nbsp;</div><div>It seems to me (correct me if I'm wrong) that implementing such thing in scheme is complex only because scheme does not have lvalues (as things that an expression can be evaluated to, that is).<br></div><div><br></div><div>Razvan</div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Neil Van Dyke &lt;neil@neilvandyke.org&gt;<br><b><span style="font-weight: bold;">To:</span></b> Razvan Rotaru &lt;roti_343@yahoo.com&gt;<br><b><span style="font-weight:
 bold;">Cc:</span></b> users@racket-lang.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, December 30, 2010 5:54:14 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [racket] setf in scheme<br></font><br>



  


Razvan Rotaru wrote at 12/30/2010 10:34 AM:
<blockquote type="cite">
  
  <div style="">
  <div>I was just wondering whether there is anything like setf in
scheme.<br>
  </div>
  </div>
</blockquote>
<br>
If you mean like "set!" to accept place lvalues, SRFI-17 is one example:<br>
<br><span>
<a target="_blank" href="http://srfi.schemers.org/srfi-17/srfi-17.html">http://srfi.schemers.org/srfi-17/srfi-17.html</a></span><br>
<br>
Implementing such a thing for a small, fixed set of places (like "car")
using only macros is easy.<br>
<br>
If, however, you want it extensible to new setters, I think you'd end
up defining matching setting procedures and hanging them off the getter
procedures as (depending on what your Racket or Scheme version has)
symbol properties, record-type-as-procedure, or some similar feature.<br>
<br>
Setters like this have sometimes seemed to me to provide a nice
linguistic symmetry, but at the same time, they are growing the
language quite a bit despite the appeal of simplicity.&nbsp; In practice, I
have never wanted to have setters.&nbsp; IMHO.<br>
<br>
<div class="moz-signature">-- <br><span>
<a target="_blank" href="http://www.neilvandyke.org/">http://www.neilvandyke.org/</a>
</span></div>


</div></div>


</div><br>

      </body></html>