From owner-freebsd-chat Wed Oct 3 12:19:29 2001 Delivered-To: freebsd-chat@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id 9944437B401 for ; Wed, 3 Oct 2001 12:19:25 -0700 (PDT) Received: from dialup-209.245.142.238.dial1.sanjose1.level3.net ([209.245.142.238] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.32 #2) id 15orXi-0005o5-00; Wed, 03 Oct 2001 12:18:54 -0700 Message-ID: <3BBB64CD.7B3A2C86@mindspring.com> Date: Wed, 03 Oct 2001 12:19:41 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: j mckitrick Cc: David Scheidt , Rahul Siddharthan , "Gary W. Swearingen" , freebsd-chat@FreeBSD.ORG Subject: Re: code density vs readability References: <20011002213051.A28111@lpt.ens.fr> <20011002214655.A1713@dogma.freebsd-uk.eu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org j mckitrick wrote: > | > For programs, I like its syntax highlighting. I don't know whether > | > nvi has that. > | > | I hope not... > > No offense to David..... > > > Why do some people, especially advanced programmers, hate this feature > so much? Isn't it great for catching misspellings before compiling, and > for helping the eye locate a target? It also seems good for helping the > mind quickly understand the structure of the code. It simply includes > more valuable information. I realize it can be overdone, but since you > can configure it any way you like, why is it so bad? Why does > everything that makes programming easier get labeled a 'crutch' at some > point? I mean, LINT could be called a remedy for poor programming > skills in the first place, but many accomplished programmers us it, > correct? I think it's because we do things like this: main(int ac, char *av[]) { } ... main(int ac, char *av[]) { if( ac < 2) { } } ... main(int ac, char *av[]) { if( ac < 2) { usage(); } } ... main(int ac, char *av[]) { if( ac < 2) { usage(); } while( getopt("hc:f")) { } } ... ...so we never run into problems like unmatched braces. We do similar things for block comments. I agree that it could be useful for catching mispellings of keywords, but since those spellings have been wired into our medulas (we just think of what we want, and our fingers type the right thing for us: there's no "spelling" involved... just like editing in "vi": we think what we want to happen, and our finger know how to make it happen without us having to tell them), they are extremely rare. I guess I always have to laugh when someone used to syntax highlighting is forced to use a standard version of an editor because they don't have the option of compiling their favorite editor on a platform; the poor person is well and truly lost in their own code! I think that's adequate justification for calling it a "crutch": they can't walk without it. Per LINT: most accomplished programmers _don't_ use it. It is very easy to make code pass LINT: it's most useful as a teaching tool, and the compiler these days is almost up to doing the task entirely on its own. Once you get the good habits engrained, then it's not an issue after that: your code will always pass LINT without needing modification. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message