Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$!.pending #1214

Closed
p6rt opened this issue Aug 8, 2009 · 10 comments
Closed

$!.pending #1214

p6rt opened this issue Aug 8, 2009 · 10 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 8, 2009

Migrated from rt.perl.org#68320 (status was 'open')

Searchable as RT68320$

@p6rt
Copy link
Author

p6rt commented Aug 8, 2009

From ben@petering.net

eval 'widdle()';
eval 'waddle()';

say "pending​: " ~ $!.pending.perl;

... gives ...

Method 'pending' not found for invocant of class 'Exception'

@p6rt
Copy link
Author

p6rt commented Oct 10, 2011

From @coke

On Sat Aug 08 00​:51​:28 2009, missingthepoint wrote​:

eval 'widdle()';
eval 'waddle()';

say "pending​: " ~ $!.pending.perl;

... gives ...

Method 'pending' not found for invocant of class 'Exception'

I believe this now needs a try, but is still todo​:

19​:07 < [Coke]> rakudo​: try eval 'waddle()'; say "pending​: " ~ $!.pending.perl;
19​:07 <+p6eval> rakudo 38907e​: OUTPUT«Method 'pending' not found for invocant
  of class 'Exception'␤ in block <anon> at /tmp/bQT6MmUmQC​:1␤
  in <anon> at /tmp/bQT6MmUmQC​:1␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 10, 2011

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 11, 2016

From @skids

It seems that long since any mention of $!.pending was
removed from the design docs. However, roast has
S04-exceptions/pending.t and this file has (fudged)
tests for that... and this file seems to be in the
6.c roast branch as well.

So this boils down to two questions​:

1) What's the meaning of a *fudged* test in 6.c. Since the fudge
is implementation-specific, probably we have promised $!.pending to users now.

2) What's the use case for $!.pending and if/how this is to be satisfied.
Note there is now this conjecture in S04​:

[Conjecture​: all unhandled exceptions within a routine could be stored in
C<@​!>, with the most recent first. C<$!> would then be sugar for C<@​![0]>.
(Or we use push semantics and C<$!> means C<@​![*-1]>.) This might be more
robust than merely making C<@​!> a parameter to CATCH. However, the new
semantics of autothrowing when sink eats a Failure means we won't have many
unthrown exceptions waiting around to be handled at the end of the block
anymore. We should probably at least issue warnings, though, if the GC
eventually collects a failure that was never handled. We can't really rely
on end-of-routine cleanup to deal with failures that are returned as normal
data, unless we go with the overhead of a lexical C<@​!> variable.]

(There's no special reason for bumping this old ticket I was just bored)

@p6rt p6rt added the Todo label Jan 5, 2020
@JJ
Copy link

JJ commented Mar 3, 2020

if this ticket is addressed/closed it would mean closing something that is 11 years old...

@JJ
Copy link

JJ commented May 6, 2020

I would say this no longer holds. EVAL (not eval) throw inmediately, and .pending is implemented. So I would say that this issue is no longer relevant.

@JJ JJ closed this as completed May 6, 2020
@AlexDaniel
Copy link
Member

But what does it mean? Does it mean that tests for .pending should be removed?

@AlexDaniel AlexDaniel reopened this May 6, 2020
@AlexDaniel
Copy link
Member

And if .pending was implemented, then what's the meaning of that comment from 2016?

@JJ
Copy link

JJ commented May 6, 2020

Well, it means that the original issue:

Method 'pending' not found for invocant of class 'Exception'

no longer holds. The way I see it, @skids' comment raises a totally different issue.

@JJ
Copy link

JJ commented Dec 29, 2020

Closing this again, since the issue as stated has been solved.

@JJ JJ closed this as completed Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants