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

:U means "type object", not "undefined" in Rakudo #2858

Closed
p6rt opened this issue Aug 9, 2012 · 6 comments
Closed

:U means "type object", not "undefined" in Rakudo #2858

p6rt opened this issue Aug 9, 2012 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 9, 2012

Migrated from rt.perl.org#114442 (status was 'rejected')

Searchable as RT114442$

@p6rt
Copy link
Author

p6rt commented Aug 9, 2012

From @masak

<masak> :T allows only type objects, not just any undefined thing.
<masak> :U allows undefined things.
<masak> r​: multi foo(Int​:U) { say "undefined" }; multi foo(Int​:D) {
say "defined" }; foo 42; foo 42 but role { method defined { False } }
<p6eval> rakudo 038a3c​: OUTPUT«defined␤defined␤»
<masak> apparently that wasn't undefined enough :)
<sirrobert> heh
<quietfanatic> Rakudo might be cheating.
<Tene> r​: multi foo(Int​:U) { say "undefined" }; multi foo(Int​:D) { say
"defined" }; foo 42; foo Int
<p6eval> rakudo 038a3c​: OUTPUT«defined␤undefined␤»
<jnthn> :U is currently taken to mean "type object"
<masak> huh.
<jnthn> Just after I implemented that lot, the spec got changed. :/
* masak submits rakudobug
<jnthn> I'm hoping if I ignore the spec change enough it may change back :P

@p6rt
Copy link
Author

p6rt commented Aug 14, 2015

From @ShimmerFairy

This is actually according to spec. The :U and :D smileys check on objects via .DEFINITE, not .defined. So the behavior presented is as it should be.

Additionally, the :T smiley was never implemented in rakudo, and :U/​:D have come to distinguish type objects from object instances. The only theoretical difference between :T and :U as spec'd is not applicable anymore. (​:U was supposed to let Failure objects through where :T didn't, but in today's Perl 6 Failure objects are never accepted by type constraints any differently than all other types.) So the :T smiley has been removed from the spec.

For both reasons, this ticket should be rejected.

@p6rt
Copy link
Author

p6rt commented Aug 14, 2015

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

@p6rt
Copy link
Author

p6rt commented Aug 15, 2015

From @labster

<jnthn> I'm hoping if I ignore the spec change enough it may change back :P

Wish granted. Rejecting ticket.

On Fri Aug 14 00​:03​:08 2015, lue wrote​:

This is actually according to spec. The :U and :D smileys check on
objects via .DEFINITE, not .defined. So the behavior presented is as
it should be.

Additionally, the :T smiley was never implemented in rakudo, and :U/​:D
have come to distinguish type objects from object instances. The only
theoretical difference between :T and :U as spec'd is not applicable
anymore. (​:U was supposed to let Failure objects through where :T
didn't, but in today's Perl 6 Failure objects are never accepted by
type constraints any differently than all other types.) So the :T
smiley has been removed from the spec.

For both reasons, this ticket should be rejected.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Aug 15, 2015

From @labster

<jnthn> I'm hoping if I ignore the spec change enough it may change back :P

Wish granted. Rejecting ticket.

On Fri Aug 14 00​:03​:08 2015, lue wrote​:

This is actually according to spec. The :U and :D smileys check on
objects via .DEFINITE, not .defined. So the behavior presented is as
it should be.

Additionally, the :T smiley was never implemented in rakudo, and :U/​:D
have come to distinguish type objects from object instances. The only
theoretical difference between :T and :U as spec'd is not applicable
anymore. (​:U was supposed to let Failure objects through where :T
didn't, but in today's Perl 6 Failure objects are never accepted by
type constraints any differently than all other types.) So the :T
smiley has been removed from the spec.

For both reasons, this ticket should be rejected.

@p6rt
Copy link
Author

p6rt commented Aug 15, 2015

@labster - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Aug 15, 2015
@p6rt p6rt added the Bug label Jan 5, 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

1 participant