Date: Thu, 04 Apr 2002 21:51:52 -0700 (MST) From: "M. Warner Losh" <imp@village.org> To: mi@aldan.algebra.com Cc: obrien@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/yacc main.c Message-ID: <20020404.215152.96920098.imp@village.org> In-Reply-To: <200204050018.g350HvnF007641@aldan.algebra.com> References: <20020404152029.A81900@dragon.nuxi.com> <200204050018.g350HvnF007641@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200204050018.g350HvnF007641@aldan.algebra.com>
Mikhail Teterin <mi@aldan.algebra.com> writes:
: 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?
It doesn't bother me for this case.
: > 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.
For some things yes. And sometimes that just isn't worth the battle.
Warner
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?20020404.215152.96920098.imp>
