<div dir="ltr">In xrepl that program catches breaks as well, so that behavior is probably fine and unavoidable.<br><br>Although somehow drracket's repl managed to break out of that program. I wonder how it does that...</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 5, 2014 at 3:00 PM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@cs.indiana.edu" target="_blank">samth@cs.indiana.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What if you do this:<br>
<br>
(let l () (with-handlers ([void (l)]) (l)))<br>
<br>
This catches `exn:break` (and everything else) and calls `l`.<br>
<span class="HOEnZb"><font color="#888888"><br>
Sam<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sat, Apr 5, 2014 at 2:54 PM, Greg Hendershott<br>
<<a href="mailto:greghendershott@gmail.com">greghendershott@gmail.com</a>> wrote:<br>
>> thread cells are subject to GC and that's fine. The real issue is that I<br>
>> might write a program that does (effectively) this:<br>
>><br>
>> > (let l()(l))<br>
>><br>
>> and then I'm stuck.<br>
><br>
> Good point, but that's not a problem. A break returns to read-eval-print-loop.<br>
><br>
> Example transcript:<br>
><br>
>> (let l () (l))<br>
> C-cC-c<br>
> ; user break<br>
>> (displayln "broken but alive")<br>
> broken but alive<br>
>><br>
><br>
> (The double Control-C just being necessary as usual in an Emacs comint-buffer.)<br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br></div>