On Wed, Jan 31, 2024 at 12:22 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> I suspect that most cases will look like your Eglot example, where by
> the time you get to the `funcall/functionp` the backtrace doesn't
> immediately tell you where that function comes from (

Of course, not where the interpreted function comes from.  But at least
I'll know where to look, where to edebug.

> Could be.  That's one of the reasons why my patch doesn't change
> `functionp` (yet).

Yes, my advice is to keep it like that but add the warning (in funcall).

> > 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"?