emacs-devel
[Top][All Lists]
Advanced

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

Re: Distinguishing `consp` and `functionp`


From: Stefan Monnier
Subject: Re: Distinguishing `consp` and `functionp`
Date: Fri, 26 Jan 2024 18:55:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> Rather I'm annoyed at the corner cases where
>>
>>     (functionp (mapcar ...))
>>
>> can occasionally return t, simply because the returned list happens to
>> start with the symbol `closure` or `lambda`.
>
> So you want this to return nil, but still allow 'funcall' of
> said returned lists?

That's right: for compatibility reasons, I think we have to support the
`funcall` case for the foreseeable future (and really, it costs very
little to do so), but I think the `functionp` case doesn't need that
level of backward compatibility.

Tho, you'll note that my patch doesn't actually change `functionp`:
that would be presumably done in a subsequent step.


        Stefan




reply via email to

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