Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Apr 2002 19:17:57 -0500 (EST)
From:      Mikhail Teterin <mi@aldan.algebra.com>
To:        obrien@FreeBSD.org
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/yacc main.c
Message-ID:  <200204050018.g350HvnF007641@aldan.algebra.com>
In-Reply-To: <20020404152029.A81900@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On  4 Apr, David O'Brien wrote:
> On Thu, Apr 04, 2002 at 05:43:50PM -0500, Mikhail Teterin wrote:
>> >   Use strlen() rather than magic number.
>> [...]
>> 
>> Beware of strlen :) The magic number was just a ``sizeof temp_form'' --
>> computed at the code-writing time. Your change moved the computation to
>> run-time, which, IMHO, is too far.
> 
> There is nothing wrong with run-time checks.

Run-time checks make sense for the stuff that can not be determined at
compile-time. If it can, the run-time check is a useless waste of CPU
time and memory.

I'm scared of the vision of countless thousands of computers calling
strlen(temp_form) and constantly coming up with the same number -- 16.
Are you not?

> You are also missing the point which is to reduce differences with
> *BSD, not add more.

I know. But I'm talking to a FreeBSD developer. If the policy for a
change is to convince some other BSD to make it first -- please, say so.

	-mi



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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