Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2001 21:30:24 +0200
From:      Rahul Siddharthan <rsidd@physics.iisc.ernet.in>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        j mckitrick <jcm@FreeBSD-uk.eu.org>, David Scheidt <rufus@brain.mics.net>, "Gary W. Swearingen" <swear@blarg.net>, freebsd-chat@FreeBSD.ORG
Subject:   Re: code density vs readability
Message-ID:  <20011003213024.A660@lpt.ens.fr>
In-Reply-To: <3BBB64CD.7B3A2C86@mindspring.com>; from tlambert2@mindspring.com on Wed, Oct 03, 2001 at 12:19:41PM -0700
References:  <20011002213051.A28111@lpt.ens.fr> <Pine.BSI.4.20.0110021606080.7990-100000@brain.mics.net> <20011002214655.A1713@dogma.freebsd-uk.eu.org> <3BBB64CD.7B3A2C86@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert said on Oct  3, 2001 at 12:19:41:
> > <rant>
> > 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?  </rant>
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011003213024.A660>