[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emac
From: |
João Távora |
Subject: |
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? |
Date: |
Tue, 29 Aug 2023 12:20:31 +0100 |
On Tue, Aug 29, 2023 at 12:09 PM Ihor Radchenko <yantar92@posteo.net> wrote:
>
> João Távora <joaotavora@gmail.com> writes:
>
> > FWIW, Common Lisp has reader macros to solve the problem:
> > http://clhs.lisp.se/Body/24_aba.htm
>
> Elisp also has reader macros ;)
> See lisp/emacs-lisp/backquote.el
Of course it has many more even, but the problem is that such things
are hardcoded in C even if part of the implementation then jumps to Lisp.
See lread.c around line 4318 for how backquote is hardcoded. In Common
Lisp there is a programmable mechanism for adding such macros entirely
within the language. So don't be fooled, Elisp simply doesn't have that.
João
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Philip Kaludercic, 2023/08/29
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Stefan Kangas, 2023/08/29
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, LdBeth, 2023/08/29