<br><div class="gmail_quote">2010/6/11 Álvaro Castro-Castilla <span dir="ltr"><<a href="mailto:alvaro.castro.castilla@gmail.com">alvaro.castro.castilla@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Hi,<br></div><div><br></div><div>I can see sometimes these kind of procedures ##car, ##cdr, ##null? etc... in code that has been optimized for Gambit. What is exactly the difference between those and the standard ones?</div>
</blockquote><div><br>(declare (safe))<br>
(car x) ; Argument typechecking made<br>

(##car x) ; No argument typechecking made<br>
<br>
(declare (not safe))<br>

(##car x) ; No argument typechecking made<br>

(car x) ; No argument typechecking made<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>And if these ones are faster, why are they defined as separate functions instead of just substituting the standard ones when in (unsafe) compilation?</div>
</blockquote><div><br>Substitution is made automatically on (not safe) compilation.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div> Then, how are they really used?</div></blockquote><div><br>The purpose of ##:s may be to explicitly declare unsafe use of a 
procedure, as the programmer is 100% sure the passed type is always 
correct. A hypothethical example would be (define (cdr-nice pair) (and 
(pair? pair) (##cdr pair))) .<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div></div><div>Thanks a lot,</div><div><br></div><font color="#888888"><div>Álvaro</div></font></blockquote><div><br>Mikael<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font color="#888888"><br>
</font><br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br>