At 3:42 PM +0100 11/9/04, Leopold Toetsch wrote:
Dan Sugalski wrote:

This was specified ages ago

You have skipped one question:

Nope. Language designer call. (Granted, in this case if the call is "make it work" then the language designer and I get to have a chat, but... :)


how would PIR code of this eval() look like, and specifically, what about that "goto"?

That goto's bogus and shouldn't work. I think it does right now, but I'm OK with making it not work -- it *shouldn't*, since in perl the eval's an anonymous sub, which means you've done a goto out of a sub and into another, which... well, that's not supposed to work.


# #! perl -w
# my $i= 5;
# LAB:
#    $i++;
#    eval("goto LAB if ($i==6)");
#    print "$i\n";
#
# 7
#####

I can see this having some ramifications for languages with REPL facilities and goto, but I'm not sure I have a problem with that not working right.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to