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
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";
>>>>> "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
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
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
>>>>> "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
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
>>>>> "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->
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
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
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
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
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
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
>>>>> "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
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
>>>>> "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
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
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
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
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.
>>
>&
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
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
bj->method...
}
catch { }
finally {}
or
$status = $obj->method...
And have both work properly.
--
Chaim FrenkelNonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183
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
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
26 matches
Mail list logo