Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Oct 2001 12:47:38 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Rahul Siddharthan <rsidd@physics.iisc.ernet.in>
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:  <3BBB6B5A.7AA9F659@mindspring.com>
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> <20011003213024.A660@lpt.ens.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
Rahul Siddharthan wrote:
> 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.

I'm a "vi" user ("Vi anonymous members: ``Hi, Terry!''")...

If you are generally paranoid:

	:set showmatch

Otherwise, the % key will let you match {, (, and [ manually.

-- Terry

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?3BBB6B5A.7AA9F659>