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

error message when using commas in c-style “loop” (loop (my $x = 0, $x < 10, $x++) {}) #5220

Closed
p6rt opened this issue Apr 8, 2016 · 4 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Apr 8, 2016

Migrated from rt.perl.org#127857 (status was 'new')

Searchable as RT127857$

@p6rt
Copy link
Author

p6rt commented Apr 8, 2016

From @AlexDaniel

Code​:
loop (my $x = 0, $x < 10, $x++) {}

Result​:
===SORRY!=== Error while compiling -e
Malformed loop spec
at -e​:1
------> loop (my $x = 0, $x < 10, $x++�) {}

The error message is not bad at all. But it would be awesome if it could detect that the programmer used commas instead of semicolons.

@p6rt
Copy link
Author

p6rt commented Oct 8, 2017

From @AlexDaniel

There is a PR but it's really bad​: rakudo/rakudo#1188

On 2016-04-07 17​:05​:15, alex.jakimenko@​gmail.com wrote​:

Code​:
loop (my $x = 0, $x < 10, $x++) {}

Result​:
===SORRY!=== Error while compiling -e
Malformed loop spec
at -e​:1
------> loop (my $x = 0, $x < 10, $x++�) {}

The error message is not bad at all. But it would be awesome if it
could detect that the programmer used commas instead of semicolons.

@p6rt
Copy link
Author

p6rt commented Oct 8, 2017

From @AlexDaniel

On a slightly more positive note, that PR indeed resolves this ticket. I think the new error message is clear enough.

On 2017-10-08 00​:52​:36, alex.jakimenko@​gmail.com wrote​:

There is a PR but it's really bad​:
rakudo/rakudo#1188

On 2016-04-07 17​:05​:15, alex.jakimenko@​gmail.com wrote​:

Code​:
loop (my $x = 0, $x < 10, $x++) {}

Result​:
===SORRY!=== Error while compiling -e
Malformed loop spec
at -e​:1
------> loop (my $x = 0, $x < 10, $x++�) {}

The error message is not bad at all. But it would be awesome if it
could detect that the programmer used commas instead of semicolons.

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
@AlexDaniel
Copy link
Member

Closing as rakudo/rakudo#1188 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

2 participants