in reply to making perl more forgiving
Regarding your suggestion. Since perl already detects runaway strings, it would be nice to have the compiler say "I found a runaway string starting with "foxx', but if I change your ' to a " then I can compile it.
Perhaps in perl6 we could have a module that fires up when the compile fails and tries to mangle the code near the syntax error until it compiles.
Nice idea, I'll have to think about it some more.
Update: I suspect that this is getting downvotes because people don't like the idea of a compiler automatically correcting their mistakes. I don't like that idea either. But I do like the idea of a compiler printing out "syntax error at line 65, did you mean 'print "foxx"' instead?"
They should put a feature like this in Perl. Oh wait! They already did.
Thanks to chromatic for the correction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: making perl more forgiving
by Abigail-II (Bishop) on May 16, 2004 at 01:15 UTC | |
by jepri (Parson) on May 16, 2004 at 01:33 UTC | |
by Abigail-II (Bishop) on May 16, 2004 at 02:15 UTC | |
by jepri (Parson) on May 16, 2004 at 02:20 UTC | |
| |
|
Re: Re: making perl more forgiving
by chromatic (Archbishop) on May 16, 2004 at 08:34 UTC | |
by jepri (Parson) on May 16, 2004 at 09:07 UTC |