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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,ea99940253996e3e X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,ea99940253996e3e X-Google-Attributes: gid103376,public X-Google-Thread: 108717,ea99940253996e3e X-Google-Attributes: gid108717,public X-Google-Thread: f43e6,ea99940253996e3e X-Google-Attributes: gidf43e6,public X-Google-ArrivalTime: 2003-10-04 02:53:11 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!cyclone.bc.net!in.100proofnews.com!in.100proofnews.com!news.tdcnorge.no!news01.chello.no!newsfeed1.e.nsc.no!nsc.no!nextra.com!news2.e.nsc.no.POSTED!53ab2750!not-for-mail Sender: leifm@huldreheim.huldreskog.no Newsgroups: comp.software-eng,comp.programming,comp.lang.c++,comp.lang.ada Subject: Re: Spell-checking source code (Was: ISO Studies of underscores...) References: <2cfd1a4e.0309252032.3e3c0a1a@posting.google.com> <863cefjy6l.fsf@strudel.futureapps.de> <86ad8i7d1d.fsf_-_@huldreheim.huldreskog.no> <8665j66u8z.fsf@huldreheim.huldreskog.no> <3f7df3af_2@nntp2.nac.net> From: Leif Roar Moldskred Message-ID: <86vfr55o45.fsf@huldreheim.huldreskog.no> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 80.212.67.67 X-Complaints-To: news-abuse@telenor.net NNTP-Posting-Date: Sat, 04 Oct 2003 11:53:10 MEST X-Trace: news2.ulv.nextra.no 1065261190 80.212.67.67 Date: 04 Oct 2003 11:49:30 +0200 X-Received-Date: Sat, 04 Oct 2003 11:53:02 MET DST (news01.chello.no) Xref: archiver1.google.com comp.software-eng:45 comp.programming:341 comp.lang.c++:761 comp.lang.ada:204 Date: 2003-10-04T11:49:30+02:00 List-Id: "Kevin Morenski" writes: > Let's say you had a variable named "tHTa," for example. With respect to > your concept, this would be a misspelling of the word "that." Now, a lot of > programmers--myself included--use letters to represent certain things in > variable names. tHTa could mean "type HTa" or anything else a programmer > could think of. How could a program possibly differentiate between > conventions in the naming of variables? In the same way that spell-checkers for ordinary text today handles names and other words that are correct, but not in the dictionary: When detecting the unknown word the first time, ask the user what to do with it - whether to correct it, accept this instance, accept all instances in this document or add it to your private dictionary. (For a spell-checking of source-code we'd probably also want the option "accept all instances with this case.") This really isn't any different from the same problem in regular text, except that your programming convention might cause a lot of unknown words to appear. If that's a major headache, just don't spell-check. -- Leif Roar Moldskred