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

Make <<+>> of two sets make sense in Rakudo #2253

Closed
p6rt opened this issue Nov 13, 2010 · 3 comments
Closed

Make <<+>> of two sets make sense in Rakudo #2253

p6rt opened this issue Nov 13, 2010 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 13, 2010

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

Searchable as RT79158$

@p6rt
Copy link
Author

p6rt commented Nov 13, 2010

From @masak

<colomon> rakudo​: my $a = Set.new(1, 2, 3, 4); say ($a <<+>>
Set.new(2, 42)).perl;
<p6eval> rakudo 2c66f9​: OUTPUT«{"2" => 2}␤»
<colomon> okay, that's officially not at all what I expected
<masak> huh?
* masak submits rakudobug

Since Sets are unordered, the exact result of <<+>> probably wouldn't
be guaranteed. But it definitely shouldn't be a hash, it should
probably be a Set with four elements.

@p6rt
Copy link
Author

p6rt commented Nov 14, 2010

From @Kodiologist

S03 says "an upgraded scalar is the only thing that will work for an
unordered type". Thus, as of 2f958fd, hyperoperations on two Sets are
illegal​:

$ Set.new(1, 2, 3, 4) <<+>> Set.new(2, 42)
When one argument of a hyperoperator is an unordered data structure, the
other must be scalar
  in 'hyper' at line 227​:CORE.setting
  in main program body at line 1

@p6rt
Copy link
Author

p6rt commented Nov 14, 2010

@Kodiologist - Status changed from 'new' to 'rejected'

@p6rt p6rt closed this as completed Nov 14, 2010
@p6rt p6rt added the Todo 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