Since perl already detects runaway strings
The fact that a compiler can figure out that you forgot to close off a string doesn't mean the compiler has any idea where this happened.
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.
What would be the point? Clearly it can't do it silently because it might mangle it to something that compiles, but doesn't do what the programmer intended. OTOH, if it can't be silenced, the programmer wants to fix the mistake anyway, because otherwise the compiler will split out messages each time the program is run.
I suspect that this is getting downvotes because people don't like the idea of a compiler automatically correcting their mistakes.
I think a compiler that automatically corrects mistakes would be wonderful. I'm sure that someone who manages to make a compiler that corrects mistakes correctly has a pretty good chance of winning a Turing award.
But I do like the idea of a compiler printing out "syntax error at line 65, did you mean 'print "foxx"' instead?"
How much different from "Might be a runaway multi-line "" string starting on line N" is that?

Abigail


In reply to Re: making perl more forgiving by Abigail-II
in thread making perl more forgiving by simplitia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.