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

andthen doesn't return undefined LHS #5440

Closed
p6rt opened this issue Jul 9, 2016 · 6 comments
Closed

andthen doesn't return undefined LHS #5440

p6rt opened this issue Jul 9, 2016 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 9, 2016

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

Searchable as RT128586$

@p6rt
Copy link
Author

p6rt commented Jul 9, 2016

From @pmichaud

Per S03, &infix​:<andthen> should return the first argument indicating
failure (undefined). On current Rakudo​:

18​:00 <pmichaud> m​: say (Int andthen 3)
18​:00 <camelia> rakudo-moar 959cd3​: OUTPUT«()␤»
18​:00 <pmichaud> m​: say (Int andthen 3).WHAT
18​:00 <camelia> rakudo-moar 959cd3​: OUTPUT«(Slip)␤»

Per S03, the answer should be OUTPUT«(Int)␤».

Pm

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @salortiz

The change was introduced by rakudo/rakudo@b527b31
and spectested by Raku/roast@86a4c3e

I want to think that the change in (at that time) line 582 was a copy/paste error, 'cus the commit message talk about 'orelse'.

And the subsequent change in roast simply a rush reaction.

Any way, you are in a better position to discuss the issue with the author.

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

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

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @salortiz

For the record, reverting to returning the first undefined value and not "Empty" produces the following fallout in roast​:

t/spec/S03-metaops/reduce.rakudo.moar (Wstat​: 1024 Tests​: 542 Failed​: 4)
  Failed tests​: 425, 429, 505, 509
t/spec/S03-operators/andthen.t (Wstat​: 256 Tests​: 8 Failed​: 1)
  Failed test 5 <--- The original change annotated above
t/spec/S04-statement-modifiers/with.rakudo.moar (Wstat​: 768 Tests​: 35 Failed​: 3)
  Failed tests​: 19, 21, 27

@p6rt
Copy link
Author

p6rt commented Dec 18, 2016

From @zoffixznet

On Sat, 09 Jul 2016 11​:03​:04 -0700, pmichaud wrote​:

Per S03, &infix​:<andthen> should return the first argument indicating
failure (undefined). On current Rakudo​:

18​:00 <pmichaud> m​: say (Int andthen 3)
18​:00 <camelia> rakudo-moar 959cd3​: OUTPUT«()␤»
18​:00 <pmichaud> m​: say (Int andthen 3).WHAT
18​:00 <camelia> rakudo-moar 959cd3​: OUTPUT«(Slip)␤»

Per S03, the answer should be OUTPUT«(Int)␤».

Pm

FWIW, when I was fixing another bug, TimToady confirmed `andthen` returns an Empty by design, so that it works with list comprehensions​: https://irclog.perlgeek.de/perl6-dev/2016-11-11#i_13550043

@p6rt
Copy link
Author

p6rt commented Jun 8, 2017

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

@p6rt p6rt closed this as completed Jun 8, 2017
@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