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

Itemized empty list has wrong .perl stringification #5027

Closed
p6rt opened this issue Jan 9, 2016 · 4 comments
Closed

Itemized empty list has wrong .perl stringification #5027

p6rt opened this issue Jan 9, 2016 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 9, 2016

Migrated from rt.perl.org#127222 (status was 'resolved')

Searchable as RT127222$

@p6rt
Copy link
Author

p6rt commented Jan 9, 2016

From lucasbuchala@gmail.com

An itemized empty list is getting ".perl"-stringified as "$()", which
I think is wrong since $() means some idiom using "$/". The fix should
be just to make it stringify as "$( )" (with a space in the middle) or
maybe "().item" for clarity. (Maybe in a future version of the
language, the syntax "$()" could be made to really mean a itemized
empty list.)

say $( ).perl
$()

say ().item.perl
$()

'foo' ~~ /o+/; say $()
oo

@p6rt
Copy link
Author

p6rt commented Aug 25, 2016

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 10, 2017

From @zoffixznet

On Sat, 09 Jan 2016 05​:05​:06 -0800, lucasbuchala wrote​:

An itemized empty list is getting ".perl"-stringified as "$()", which
I think is wrong since $() means some idiom using "$/". The fix should
be just to make it stringify as "$( )" (with a space in the middle) or
maybe "().item" for clarity. (Maybe in a future version of the
language, the syntax "$()" could be made to really mean a itemized
empty list.)

say $( ).perl
$()

say ().item.perl
$()

'foo' ~~ /o+/; say $()
oo

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@a148c70190
Test​: Raku/roast@dff2d90263

This also identified a wrong test in 6.c-errata​:
Approval for change​: https://irclog.perlgeek.de/perl6-dev/2017-02-10#i_14080972
Change in 6.c-errata​: Raku/roast@ca0ce9a5d7
Change in master​: Raku/roast@fc2f46ea02

@p6rt p6rt closed this as completed Feb 10, 2017
@p6rt
Copy link
Author

p6rt commented Feb 10, 2017

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

@p6rt p6rt added the glr 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