[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Test your ELisp knowledge
From: |
Yuri Khan |
Subject: |
Re: Test your ELisp knowledge |
Date: |
Fri, 9 Feb 2024 11:29:39 +0700 |
On Fri, 9 Feb 2024 at 09:53, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Here's a test for you: without trying to run it
Does putting myself in the shoes of a Lisp interpreter count as running?
> guess what error will
> be signaled when you do:
>
> M-: (their-fun (/ my-x 0)) RET
Something about their-fun not having been defined first. Because if it
is, my next step depends on whether it’s a function or a macro.
If it’s a function then the next is that my-x is not defined as a
variable. If it’s a macro, it might fail on its own, or decide not to
evaluate its argument as a form, but if it does, then same behavior as
with a function.
Otherwise I guess it comes to the division by zero, and that’s the
real question? I guess the result would depend on the type of the
value of my-x, possibly not failing but yielding a positive infinity,
negative infinity or NaN for floats? Otherwise, for integers, I’d
expect a division by zero error; for non-numeric types, a type error.
- Test your ELisp knowledge, Stefan Monnier, 2024/02/08
- RE: [External] : Test your ELisp knowledge, Drew Adams, 2024/02/08
- Re: Test your ELisp knowledge,
Yuri Khan <=
- Re: Test your ELisp knowledge, Po Lu, 2024/02/09
- Re: Test your ELisp knowledge, Manuel Giraud, 2024/02/09
- Re: Test your ELisp knowledge, Manuel Giraud, 2024/02/09
- Re: Test your ELisp knowledge, tomas, 2024/02/09