[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: should fset 'symbol get an undefined function warning?
From: |
Stefan Monnier |
Subject: |
Re: should fset 'symbol get an undefined function warning? |
Date: |
Tue, 30 Oct 2007 20:55:03 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
>> > `defalias' might be better to use in this context, but it
>> > should still be good to not issue that warning for `fset'.
>> > (I'm not saying anyone has disagreed with that.)
>>
>> I disagree: `fset' is meant to *change* the function-slot
>> of a symbol, not to initialize it. So it's use shouldn't be treated by
>> the byte-compiler as a declaration. Insted, the byute-compiler should
>> complain about the use of `fset' on an unknown function similarly to the
>> use of `set(q)' on an unknown variable.
> Good point. I'm convinced.
> Was there an opposing consideration that led you to say "Could be" at first,
> or was that before this point occurred to you?
No. My area of expertise is functional programming where there's a *very*
clear difference between changing the value of a variable and initializing
that variable (e.g. in SML and Haskell you simply can't do the equivalent
of `setq' or `fset').
Stefan
Re: should fset 'symbol get an undefined function warning?, Richard Stallman, 2007/10/30