Re: Fatal/autodie exception hierarchies for Perl 5
On Mon, Jun 2, 2008 at 6:50 PM, Larry Wall <[EMAIL PROTECTED]> wrote: >* Exception handlers run in the lexical context of the block being >tried. >* Exception handlers run in the dynamic context of the code that is >failing. the first seems dangerous, esp. considering the availability of the second. Has "lexical" been redefined?
Re: Fatal/autodie exception hierarchies for Perl 5
The catch block is lexically contained within the try block, so the inviolate nature of the curlies remains intact. On 6/3/08, David Nicol <[EMAIL PROTECTED]> wrote: > On Mon, Jun 2, 2008 at 6:50 PM, Larry Wall <[EMAIL PROTECTED]> wrote: > >>* Exception handlers run in the lexical context of the block being >>tried. >>* Exception handlers run in the dynamic context of the code that is >>failing. > > the first seems dangerous, esp. considering the availability of the > second. Has "lexical" been redefined? > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>
Re: Fatal/autodie exception hierarchies for Perl 5
Paul Fenwick wrote: [1] Klingon semantics: It is better to die() in the attempt than to return() in failure. I'll buy a beverage for whomever can help me translate that back into Klingon in time for OSCON. ;) The concept of "better ... than" is difficult to express and not very warrior-like. I would suggest using the ancient ritual words that leaders have used for eons to send their soldiers into battle: batlh yiHegh SuvwI'mo! yIcheghbe' lujwI'mo'! Die honorably as a warrior! Do not return as a looser! Qapla'! rol'a'
Re: Fatal/autodie exception hierarchies for Perl 5
On Wed, Jun 4, 2008 at 9:09 AM, Roland Giersig <[EMAIL PROTECTED]> wrote: > batlh yiHegh SuvwI'mo! yIcheghbe' lujwI'mo'! > Die honorably as a warrior! Do not return as a looser! Not quite. mo' means "because of the ", so the above says something like 'die because of the warrior', 'return because of the loser'. Also, {-be'} is for negating statements, not imperatives; you want {-Qo'} to convey "don't". I think the simplest and most Klingonlike expression of the sentiment is simply this: yIQap pagh yIHegh! (Succeed or die!) But you could say something like: SuvwI' yIDa: yIHegh! bIlujchugh yIcheghQo'! (Behave as a warrior: die! If you fail, do not return!) However, I think we are now officially *way* off topic for Perl6... -- Mark J. Reed <[EMAIL PROTECTED]>
Re: Fatal/autodie exception hierarchies for Perl 5
On Wed, Jun 04, 2008 at 10:42:33AM -0400, Mark J. Reed wrote: : However, I think we are now officially *way* off topic for Perl6... Not really--a Klingon army is a *parallel* processor, and just because one Klingon dies doesn't mean the whole army should suddenly die too. Traditional exception handling is more like equipping each Klingon with a dead-man's switch attached to a nuke. Dying by accident in someone else's nuke blast would be a death without honor. So the point of the Perl 6 exception model is to try to keep as many warriors alive as long as possible in order to inflict the maximum possible damage on the enemy, which is our highest goal, after all. :) Larry
Re: Fatal/autodie exception hierarchies for Perl 5
On Wed, Jun 4, 2008 at 7:21 AM, Mark J. Reed <[EMAIL PROTECTED]> wrote: > The catch block is lexically contained within the try block, so the > inviolate nature of the curlies remains intact. thank you.
Re: Fatal/autodie exception hierarchies for Perl 5
Mark J. Reed schrieb: I think the simplest and most Klingonlike expression of the sentiment is simply this: yIQap pagh yIHegh! (Succeed or die!) But you could say something like: SuvwI' yIDa: yIHegh! bIlujchugh yIcheghQo'! (Behave as a warrior: die! If you fail, do not return!) Thanks for setting that straight. And yes, I concurr, I must have misread the old scrolls... ;-) However, I think we are now officially *way* off topic for Perl6... Are we? Isn't this the thread about porting Lingua::tlhIngan to perl6? :-)
Re: Fatal/autodie exception hierarchies for Perl 5
Larry Wall wrote: On Wed, Jun 04, 2008 at 10:42:33AM -0400, Mark J. Reed wrote: : However, I think we are now officially *way* off topic for Perl6... Not really--a Klingon army is a *parallel* processor, and just because one Klingon dies doesn't mean the whole army should suddenly die too. Traditional exception handling is more like equipping each Klingon with a dead-man's switch attached to a nuke. Dying by accident in someone else's nuke blast would be a death without honor. So the point of the Perl 6 exception model is to try to keep as many warriors alive as long as possible in order to inflict the maximum possible damage on the enemy, which is our highest goal, after all. :) And let us not forget that, when the unthrown exception returns, one can then choose to do the honorable thing...