Well, I had my epiphany in the chatbox, so I might as well share.

If the compiler worked like a spell checker, it could pop up a dialog and say "Detected a syntax error xxx, I think you should change your code to yyy. Shall I change it?"

I spend a lot of my debugging time nailing spelling errors and missing braces. I'd rather the compiler took a guess and asked me if it was right. Pressing 'y' five times would be so much nicer than having to get back into the text editor 5 times. And if I have to press 'n' and fix it by hand, I've lost nothing.

How much different from "Might be a runaway multi-line "" string starting on line N" is that?

Just as a more useful example, why not use Symbol::Approx to guess what function I misspelled, and then suggest the correction to me?

Or how about 'Detected missing semicolon at line 33, shall I correct?' Why is it a good use of my time to correct this trivial problem by hand?

Or how about "Unmatched left brace at line 133, but if I pop a brace in front of the next 'sub xxx', I can compile. Want me to fix it?"

____________________
Jeremy
I didn't believe in evil until I dated it.


In reply to Re: Re: making perl more forgiving by jepri
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.