Re: RFC 140 (v1) One Should Not Get Away With Ignoring System Call Errors

2000-08-24 Thread Chaim Frenkel
Your way, nothing but. *ARRGGHHH*, tainted data, in Foo.pl at line 37 (Why does that remind me of rogue?) -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 140 (v1) One Should Not Get Away With Ignoring System Call Errors

2000-08-24 Thread Chaim Frenkel
first use. But the drawback would be that the actual victim may not be the primal cause. sub foo { my $fh = open(); ... Lots more code ... return $fh; } $victim = foo; print $victim "I'm helpless";

Re: On the case for exception-based error handling.

2000-08-23 Thread Chaim Frenkel
>>>>> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: PS> At 02:28 PM 8/23/00 -0700, Glenn Linderman wrote: >> Chaim Frenkel wrote: >> >> > No, that should be the difference between die and throw. Die is >> > immediately fata

Re: On the case for exception-based error handling.

2000-08-23 Thread Chaim Frenkel
e TO> to generate and propagate exceptions (die and $@) as it does now, TO> so we don't break tradition. No, that should be the difference between die and throw. Die is immediately fatal. (i.e. current semantics) throw is new and does the magic. We get no breakage that way. -- Chaim Fren

Re: On the case for exception-based error handling.

2000-08-22 Thread Chaim Frenkel
hey use PS> Fatal-checking*** This is the Perl way anyway. Fatal checking, is for core functions. And optional for module authors. Then Fatal.pm and exception.pm could possibly be consolidated. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: On the case for exception-based error handling.

2000-08-22 Thread Chaim Frenkel
>>>>> "TO" == Tony Olekshy <[EMAIL PROTECTED]> writes: TO> Chaim Frenkel wrote: >> >> You are being extreme here. I use perl _because_ it is so >> forgiving. I can easily do unlink("foo.err") and not check >> return code

Re: RFC 88: Possible problem with shared lexical scope.

2000-08-22 Thread Chaim Frenkel
his is a perfect example where my 'no exceptions' would be handy. Just do all the cleanups and ignore any throws. (Yes, it still doesn't help you with the invariant but is much neater. And if it really is needed, then perhaps a finally block would simply automaticall a 'no exce

Re: RFC 88: Possible problem with shared lexical scope.

2000-08-22 Thread Chaim Frenkel
>>>>> "DR" == Dave Rolsky <[EMAIL PROTECTED]> writes: DR> On 22 Aug 2000, Chaim Frenkel wrote: >> Could you tell me why you would want two finallys? >> >> Why not put them into one? TO> my ($p, $q); TO> try { $p = P->new; $q = Q->

Re: On the case for exception-based error handling.

2000-08-21 Thread Chaim Frenkel
n $rc or a ++$i, not even one. You are preparing to force all programmers to your way of thinking? This is not what perl is about. I DONT WANT TO BE FORCED TO USE YOUR STYLE SIMPLY TO USE THE MODULES IN CPAN OR THAT SHIP WITH PERL. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 88 v2 draft 5 is available via http.

2000-08-21 Thread Chaim Frenkel
il the debate about using else/switch instead of catch. Which switch? C's with fallthrough? Damian wants perl's switch to have no fallthrough. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 88: Possible problem with shared lexical scope.

2000-08-21 Thread Chaim Frenkel
t at the end of this part of perlsyn PS> (which says the opposite, and is easily confirmed): I vaguely recall that Gurusamy fixed this one. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: RFC 88: Possible problem with shared lexical scope.

2000-08-21 Thread Chaim Frenkel
O> share lexical scope (due, perhaps, to the vagaries of stack TO> unwinding), this feature can simply be deleted, and the outer TO> scope can be shared. TO> Yours, &c, Tony Olekshy -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Draft 3 of RFC 88 version 2.

2000-08-21 Thread Chaim Frenkel
instance variable TO> could point to a "stack snapshot" object, rather than to a data TO> structure. A mechanism like this is available in the Perl 5 TO> Devel bundle. If an RFC for such a snapshot class is added to TO> Perl 6, this RFC should be reconciled with

Re: Draft 2 of RFC 88 version 2.

2000-08-21 Thread Chaim Frenkel
the TO> cases where you would want you use them takes less source code TO> with exceptions than with return code checking, as per the TO> CONVERSION section above. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Towards a reasonable unwinding flow-control semantics.

2000-08-16 Thread Chaim Frenkel
>>>>> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: PS> At 07:10 PM 8/16/00 -0400, Chaim Frenkel wrote: >> >>>>> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: >> PS> 1. When an exception is thrown perl l

Re: Towards a reasonable unwinding flow-control semantics.

2000-08-16 Thread Chaim Frenkel
much intimate knowledge of the caller. Lets keep it simple. I'm sure we can keep a slot open for an extra argument. Hmm, would the direct object slot be ameneable to a attribute? Would that help disambiguate things? foo :attr(value) @args

Re: Dual nature (was Re: Exceptions and Objects)

2000-08-16 Thread Chaim Frenkel
>>>>> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: PS> At 07:00 PM 8/16/00 -0400, Chaim Frenkel wrote: >> Perhaps, throw can carry a return value? >> >> throw {"return value"} $exception; >> If there is an active try

Re: yoda 2

2000-08-16 Thread Chaim Frenkel
echanism that means, short circuit, but let the user know why. That selects either a non-local goto or a return mechanism depending upon context. (Dynamically within the control of a try/eval, or under pragmatic control requesting the non-local mechanism.) -- Chaim Frenkel

Re: Towards a reasonable unwinding flow-control semantics.

2000-08-16 Thread Chaim Frenkel
t don't throw. You are imposing a style on your caller. A message would be appropriate (ala, die or warn) Also a use (within main or if it can work lexically) that would mean die_if_exception_thrown. Would treat the main routine as if it were wrapped in a try block th

Re: Towards a reasonable unwinding flow-control semantics.

2000-08-16 Thread Chaim Frenkel
ected/raised in the try block itself. I probably wouldn't want to route it through the local catches. The try block knows what the situation is, it did it. So the exception is aimed at the caller not at itself. -- Chaim Frenkel

Re: Dual nature (was Re: Exceptions and Objects)

2000-08-16 Thread Chaim Frenkel
n it would be the same as a return with no arguments. >>>>> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: PS> At 10:16 AM 8/16/00 -0400, Chaim Frenkel wrote: >> One issue that haven't seen addressed, is how to _not_ have exceptions. >> >&

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-16 Thread Chaim Frenkel
unwind and a normal situation you would lose that fact. Hmm, unless you restore the value in the finally block. But that is confusing. I think you will find a reasonably even split between the two camps. One possible weight would be how often a caught exception would be rethrown. If the perc

Re: Towards a reasonable unwinding flow-control semantics.

2000-08-16 Thread Chaim Frenkel
pt { $@->any(... $_[0] ...) } => catch { } TO> except { $@->any(... $_[0] ...) } => catch { } TO> catch { } TO> Is this a problem? -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Dual nature (was Re: Exceptions and Objects)

2000-08-16 Thread Chaim Frenkel
bj->method... } catch { } finally {} or $status = $obj->method... And have both work properly. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: English language basis for "throw"

2000-08-16 Thread Chaim Frenkel
ht that the finally clause is executed under normal and exceptional conditions. I.e. there is no way to exit the context of the try block without going through the finally. -- Chaim FrenkelNonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-16 Thread Chaim Frenkel
more complex constructs. What in the simple methodology combined with Damian's switch monster, is missing? I'll hazard a guess that, if the complex syntax goes in and if there is no semantic issue, -internals will likely convert the complex version internally to a switch. So is it