[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defvars at compile time

From: Bill Wohler
Subject: Re: defvars at compile time
Date: Mon, 27 Mar 2006 17:41:46 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> Emacs-21 should complain indeed, but Emacs-CVS
>>> shouldn't (because it recognizes the (if (boundp ..) ..) form).
>> Yes it is.  But Gnus CVS supports Emacs 21 and XEmacs, so we
>> have to do something to avoid a compile warning.
> Well, I'd have to strongly disagree with "have to".  Nothing forces you to
> remove all compilation warnings for all supported emacsen.

Not in Emacs perhaps, but MH-E conventions require it. And I'd argue
that it should be required in Emacs as well.

>>> I.e. it's a bad solution.
>> I think the reason it is bad is only that it might take more
>> time than directly referring the value of the variable.
> It's much worse than that.  It's fundamentally wrong to make code less
> readable for the sake of compiler warnings.  Compiler warnings are there to
> help you find bad code and improve it.

Assuming you find the warning. The problem with a forest of compiler
warnings is that warnings you might want to see are hidden. Because
MH-E code compiles clean, if an error or warning appears, it stands
out loud and clear.

Asking how to write code that doesn't generate compiler warnings is a
legitimate question. If you can suggest a clean way to do this, we'll
do it.

Bill Wohler <address@hidden>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]