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: 103376,997e6472f58cc955 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-04 09:34:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Case dependence and coding standards Date: 04 Jun 2003 12:32:53 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <035odv8mfiksmqo69q0250qp141oebtdro@4ax.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1054745343 28190 128.183.235.92 (4 Jun 2003 16:49:03 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 4 Jun 2003 16:49:03 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:38618 Date: 2003-06-04T16:49:03+00:00 List-Id: Vinzent Hoefler writes: > Robert A Duff wrote: > > >Vinzent Hoefler writes: > > > >> Robert A Duff wrote: > >> > >> >It would be nicer to have a compiler that simply corrected such errors > >> >in the source file, instead of complaining about them. > >> > >> Well, I expect a compiler to *read* the source, not actually *write* > >> it. > > > >Sure, that's what we're all used to. But we expect our editors and > >pretty-printers and CM systems and so forth to modify our source code. > > Well, let's say it so: I expect it changes the source in the way I > intended to change the source by hacking on some keys, but never > automatically. > > >I like to turn on the GNAT switch that complains when I say "Text_io" > >instead of "Text_IO". > > Yes, me too. And then I fix such typos by hand. Wouldn't you like your IDE to have a command to fix it for you? (like Emacs and GPS). > > > > The only kind of laziness I want > >to inhibit is the kind that causes extra work in the long run > >(e.g. unreadable code). > > Yes, but I don't see, how not hitting the shift-key at the appropriate > time to generate readable code isn't laziness. Yeah, I know typos are > the usual suspects, but fixing them automatically would encourage the > coder to never use the shift key, because "the compiler fixes it > anyway". That's laziness and is contrary to my opinion that the code > has to be readable from the very first start. I agree that "code has to be readable". But I don't impose that requirement until after it compiles. Since we rely on the compiler to catch type and syntax errors, why not also rely on it to catch capitalization errors? The goal is overall productivity; how fast I can write good code. It's faster for me to not worry about hitting the space bar, as long as the editor and compiler either do it for me or make it very easy to detect and fix case errors. And yes, _thinking_ about what the capitalization of an identifier should be takes mental cycles that can be better spent thinking about the problem solution. > Its kind of the same problem why quick fixes (aka. dirty hacks) > become standard some months later... ;) I disagree. The compiler enforces capitalization, in the same way it enforces syntax rules. I'm trading brain cycles for CPU cycles, and I see a net gain. Since I now have more brain cycles available, dirty hacks are less likely. -- -- Stephe