<div dir="ltr"><span class="gmail_default" style="">I was going to keep silent on this one until I realized I disagree with both Doug and Rob here (always a little dangerous). But because of personal experience, I have a pretty strong opinion is not really a win. Note that </span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I cribbed this email response from an answer I wrote on Quora to the question: </span><div><font face="arial, helvetica, sans-serif"><br></font><div><b>When you are programming and commit a minor error, such as forgetting a semicolon, the compiler throws an error and makes you fix it for yourself. Why doesn’t it just fix it by itself and notify you of the fix instead?</b></div><div><b><br></b></div><div><div><font face="arial, helvetica, sans-serif"><br></font></div><div>FWIW: The first version of the idea <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">that I now about </span>was DWIM - <i>Do What I Mean</i> feature from BBN’s LISP (that eventually made it into InterLISP). As the Wikipedia page describes DWIM became known as "Damn Warren's Infernal Machine" [more details in the DWIM section of the jargon file].<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> As Doug points out, the original Pascal implementation for Unix, pix(1), also supported this idea of fixing your code for you, and as Rob points out, </span>UCB’s pix(1) took the idea of trying to keep going and make the compile work from the earlier Cornell PL/C compiler for the IBM 360[1], which to quote Wikipedia:</div><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">“The PL/C compiler had the unusual capability of never failing to compile any program, through the use of extensive automatic correction of many syntax errors and by converting any remaining syntax errors to output statements.”</blockquote></div><div><br></div><div>The problem is that people can be lazy, and instead of using " DWIM" as a tool to speed up their development and fix their own errors, they just ignore the errors. In fact, when we were teaching the “Intro to CS” course at UCB <span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>i<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">n the early 1980s; we</span> actually had students turn in programs that had syntax errors in them because pix(1) had corrected their<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> code -- i</span>nstead of the student fixing his/her code before handing the program into the TA (and then they would complain when they got “marked down” on the assignment — sigh)<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">.</span><br></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">IMO: </span>All in all, the experiment failed because <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">many (??most??) </span>people really don’t work that way. Putting a feature like this in an IDE or even an editor like emacs might be reasonable since the sources would be modified, but it means you need to like <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">using an </span><span class="gmail_default" style="">IDE</span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">.</span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I also ask --> what happens when the computer’s (IDE) guess is different from the programmer's real intent, and since it was ‘fixed’ behind the curtain, you don’t notice it?</span></div><br>Some other people have suggested that DWIM isn’t a little like spelling ‘auto-correct’ or tools like ‘Grammarly.’ The truth is, I have a love/hate relationship with auto-correct, particularly on my mobile devices. I'm dyslexic, so tools like this can be helpful to me sometimes, but I spend a great deal of <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">my </span>time fighting these types of tools because they are so often wrong, particularly with a small screen/keyboard, that it is just “not fun.”<br><br>This brings me back to my experience. IMO, auto-correct for programming is like DWIM all over again, and the cure causes more problems than it solves.</div><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Clem</div><div><br></div><div>[1] <span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>I<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> should add that after Cornell’s PL/C compiler was introduced, IBM eventually added a similar feature to its own PL/1, although it was not nearly as extensive as the Cornell solution. I’m sure you can find people who</span> liked it, but in both cases, I personally never found it that useful.<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></span></div></div></div></div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aY2xlbWNAY2NjLmNvbQ%3D%3D&type=zerocontent&guid=f0a9cc40-f38a-4d59-a8aa-a302ffe39641"><font color="#ffffff" size="1">ᐧ</font></div>