This raises the question of how FOR and WHILE should be handled with implicit return. I suppose, if either of those is the last form in a function, the function should just return NIL?<br><br>Also, we can extend PS LOOP to do much as CL's LOOP does with intra-loop RETURNs. But we should hold off on this till implicit return is working in PS.<br>
<br><div class="gmail_quote">On Thu, Nov 5, 2009 at 12:05 PM, <span dir="ltr"><<a href="mailto:sblist@me.com">sblist@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Vladimir,<br>
<br>
You'll probably want to handle FOR, WHILE separately in<br>
the RETURN special form, but I think this works for our<br>
purposes with the existing support for PROGN.<br>
<br>
Generally, I think that the implicit return mechanism should<br>
try its utmost to avoid generating JS syntax errors.<br>
<br>
- Scott<br>
<br>
---<br>
src/lib/ps-loop.lisp | 2 +-<br>
1 files changed, 1 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/src/lib/ps-loop.lisp b/src/lib/ps-loop.lisp<br>
index 7272247..8a383a4 100644<br>
--- a/src/lib/ps-loop.lisp<br>
+++ b/src/lib/ps-loop.lisp<br>
@@ -325,4 +325,4 @@<br>
,@(initially loop)<br>
,main<br>
,@(finally loop))<br>
- ,@(when (default-accum-var loop) `((return ,(default-accum-<br>
var loop)))))))<br>
+ ,(aif (default-accum-var loop) it nil))))<br>
--<br>
1.6.5.2<br>
<br>
<br>
<br>
_______________________________________________<br>
parenscript-devel mailing list<br>
<a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
</blockquote></div><br>