From owner-freebsd-chat Wed Oct 3 12:47:36 2001 Delivered-To: freebsd-chat@freebsd.org Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by hub.freebsd.org (Postfix) with ESMTP id D6EEC37B406 for ; Wed, 3 Oct 2001 12:47:33 -0700 (PDT) Received: from mindspring.com (dialup-209.245.142.238.Dial1.SanJose1.Level3.net [209.245.142.238]) by swan.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id MAA05273; Wed, 3 Oct 2001 12:46:50 -0700 (PDT) Message-ID: <3BBB6B5A.7AA9F659@mindspring.com> Date: Wed, 03 Oct 2001 12:47:38 -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: Rahul Siddharthan Cc: j mckitrick , David Scheidt , "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> <3BBB64CD.7B3A2C86@mindspring.com> <20011003213024.A660@lpt.ens.fr> 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 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