emacs-devel
[Top][All Lists]
Advanced

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

Re: Distinguishing `consp` and `functionp`


From: João Távora
Subject: Re: Distinguishing `consp` and `functionp`
Date: Wed, 31 Jan 2024 00:40:41 +0000


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


reply via email to

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