Skip Menu |
Report information
Id: 131363
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [LTA] Using dot instead of a semicolon as a statement end (say ‘hello’.)
Download (untitled) / with headers
text/plain 759b
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?)
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1002b
On Thu, 25 May 2017 05:58:39 -0700, alex.jakimenko@gmail.com wrote: Show quoted text
> 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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org