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: Tue, 30 Jan 2024 22:37:32 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> > Dunno.  SBCL's compiler is pretty good, it propagates types  and warns
>> > say, when using generic+ instead of must faster fixum+.
>> Knowing "this is a function" isn't terribly better than "this is
>> either a function or a cons cell starting with `lambda`": it will rarely
>> let you turn a generic+ into a fixnum+.
> Isn't knowing "this is a function" a prerequisite for proving e.g.
> "this is a function returning a fixnum"?

Maybe it's a prerequisite, but it's pretty damn far from sufficient: if
you're in a position to know that it returns a fixnum, then you
most likely won't need `funcall` to tell you that it's a function.

There are much lower hanging fruits.


        Stefan




reply via email to

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