emacs-devel
[Top][All Lists]
Advanced

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

Re: Better way to require with shorthands/renamed symbols


From: Dmitry Gutov
Subject: Re: Better way to require with shorthands/renamed symbols
Date: Mon, 27 Sep 2021 15:55:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 27.09.2021 15:24, João Távora wrote:

One should understand (or perhaps, as a programmer, one _must_
understand) that the Shorthands feature works at the Lisp reader level.

It's tricky to think about the execution of that manifestation of the
'require' special and what it does at the Shorthands level.  You're
probably thinking of putting it on the top of your file, which is the
most common case, but far from the only use.  What if it happens at
non-top level, in an IF form?  What if it happen sat top level but in
the middle of the file?  It would amount to setting variables that
influence the reader during the read process.

I think the key part is for this info to reside somewhere near the top of the file (if not in the require form, then above it, maybe).

As Stefan Monnier once wrote (here?), implementing namespace systems
isn't hard in itself (it wasn't here).  It's making the tooling around
it consistent.  The latter was only possible with the Shorthands feature
because of the relative dumbness of its approach.

BTW, it seems the new feature will need dedicated support in xref-backend-references as well.



reply via email to

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