From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,195c1254d862280d X-Google-Attributes: gid103376,public X-Google-Thread: 114c38,195c1254d862280d X-Google-Attributes: gid114c38,public From: Greg Bek Subject: Re: syntax completion - a bad thing? Date: 1997/02/10 Message-ID: <32FF06AE.190F@rational.com>#1/1 X-Deja-AN: 217776707 references: <32F91629.5F9@vsl.com.au> content-type: text/plain; charset=us-ascii organization: Rational Software Corporation mime-version: 1.0 reply-to: gab2@rational.com newsgroups: comp.lang.ada,comp.os.vxworks x-mailer: Mozilla 3.01 (Win95; I) Date: 1997-02-10T00:00:00+00:00 List-Id: Andrew Kelly wrote: > >... > > This seems, to me, to be more dangerous than it is useful ... > eg. If you accidentally delete the "end" from a nested "if", > where does the analyser stuff the "end"? Indeed, even if it > gets the placement correct (eg. by inference from the text > indentation) if code statements have been inadvertantly deleted > as well, a clearly erroneous file will compile cleanly. > The syntax completion algorthim attempts to put closing constructs close the offending opening construct. This tends to make the additions obvious to the user performing the editing. Similarly you can force it to break constructs with a well placed semi-colon when editing. Certainly there is a risk in the syntax complete creating eroneous code. But programming is an intellectual activity, you don't do it with the brain turned off. The same risk applies with a global search and replace, or the very common cut/paste style of bug where you don't quite fix up all the bits you should in the newly pasted text. I wouldn't trade my Apex Ada editor for any other option, the ability to browse definitions, perform show_usage and auto formatting and syntax completion, along with 25 levels of undo make it my editor of choice for Ada. For me it is the appropriate tool. As Jerome D wrote is his response there are ways to disable the behaviour if you want to. > I believe syntax completion should be available during editting, > but not automatically employed during compilation. As far as I > can discover, it cannot be switched off in Apex either. > > Has anybody had any experiences with syntax completion that may > confirm or allay my fears?