From owner-freebsd-chat Wed Oct 3 12:30:37 2001 Delivered-To: freebsd-chat@freebsd.org Received: from postfix2-2.free.fr (postfix2-2.free.fr [213.228.0.140]) by hub.freebsd.org (Postfix) with ESMTP id 15D6537B403 for ; Wed, 3 Oct 2001 12:30:34 -0700 (PDT) Received: from bluerondo.a.la.turk (nas-cbv-2-29-9.dial.proxad.net [213.228.29.9]) by postfix2-2.free.fr (Postfix) with ESMTP id EB6115F87E for ; Wed, 3 Oct 2001 21:30:31 +0200 (CEST) Received: (qmail 689 invoked by uid 1001); 3 Oct 2001 19:30:24 -0000 Date: Wed, 3 Oct 2001 21:30:24 +0200 From: Rahul Siddharthan To: Terry Lambert Cc: j mckitrick , David Scheidt , "Gary W. Swearingen" , freebsd-chat@FreeBSD.ORG Subject: Re: code density vs readability Message-ID: <20011003213024.A660@lpt.ens.fr> Mail-Followup-To: Terry Lambert , j mckitrick , David Scheidt , "Gary W. Swearingen" , freebsd-chat@FreeBSD.ORG References: <20011002213051.A28111@lpt.ens.fr> <20011002214655.A1713@dogma.freebsd-uk.eu.org> <3BBB64CD.7B3A2C86@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BBB64CD.7B3A2C86@mindspring.com>; from tlambert2@mindspring.com on Wed, Oct 03, 2001 at 12:19:41PM -0700 X-Operating-System: FreeBSD 4.4-RELEASE i386 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 Terry Lambert said on Oct 3, 2001 at 12:19:41: > > > > 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[]) > { > } I think if you wrote a lot of math code, with expressions like q[i]=pow(cutoff,expon)* pow(1.0/(SQR(sin(pi*(i+1.0)/L))+SQR(cutoff)),expon/2.0); (or worse) you'd find it more useful to have an editor with syntax highlighting... Yes, you could rewrite that in a more readable way from a brace-matching point of view; however, I think it would make it almost unreadable from a math point of view. As it is, C's lack of support for an exponentiation operator (especially efficient small-integer exponentiation) makes it a royal PITA, and necessitates those ugly pow() functions as well kludges like the SQR above (a macro defined elsewhere). And I'm truly grateful for gcc's __complex__ extension. R To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message