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

Using dot instead of a semicolon as a statement end (say ‘hello’.) #6268

Open
p6rt opened this issue May 25, 2017 · 3 comments
Open

Using dot instead of a semicolon as a statement end (say ‘hello’.) #6268

p6rt opened this issue May 25, 2017 · 3 comments
Labels
LTA

Comments

@p6rt
Copy link

@p6rt p6rt commented May 25, 2017

Migrated from rt.perl.org#131363 (status was 'open')

Searchable as RT131363$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 25, 2017

From @AlexDaniel

Code​:
say �hello�.
say 42

Result​:
===SORRY!=== Error while compiling -e
Two terms in a row
at -e​:2
------> say� 42
  expecting any of​:
  infix
  infix stopper
  postfix
  statement end
  statement modifier
  statement modifier loop

This bug report was motivated by this task from thinkperl6 book​:

� What if you put a period at the end of a statement?

Arguably, it can probably figure out that . was used instead of ;. The problem is that . is interpreted as an infix, and therefore it only blows up when it sees the next occurrence of two terms in a row (or any other issue)� Not sure if there is any easy way to implement something like this (but a line ending with a dot should be a good heuristic, no?)

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 25, 2017

From @zoffixznet

On Thu, 25 May 2017 05​:58​:39 -0700, alex.jakimenko@​gmail.com wrote​:

Code​:
say �hello�.
say 42

Result​:
===SORRY!=== Error while compiling -e
Two terms in a row
at -e​:2
------> say� 42
expecting any of​:
infix
infix stopper
postfix
statement end
statement modifier
statement modifier loop

This bug report was motivated by this task from thinkperl6 book​:

� What if you put a period at the end of a statement?

Arguably, it can probably figure out that . was used instead of ;. The
problem is that . is interpreted as an infix, and therefore it only
blows up when it sees the next occurrence of two terms in a row (or
any other issue)� Not sure if there is any easy way to implement
something like this (but a line ending with a dot should be a good
heuristic, no?)

IMO that feels like a solution in search of a problem that assumes too much about what the user actually intended.

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 25, 2017

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

@p6rt p6rt added the LTA label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.