[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reader macros for hidden packages
From: |
Ludovic Courtès |
Subject: |
Re: reader macros for hidden packages |
Date: |
Mon, 27 Jun 2022 10:56:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hi,
jgart <jgart@dismail.de> skribis:
> Out of curiosity, is it possible to make reader macros like this with guile?
>
> ```
> @hidden
> (define-public python-httplib2
As Maxime notes, ‘read-hash-extend’ is the only reader extension
mechanism, and it only supports hash-prefixed extensions.
That said, I very much recommend against reader extensions because they
don’t compose (the extension is installed globally), they are not
namespaced, etc. I find it OK in very narrow cases, such as gexps, but
I wouldn’t use them anywhere else.
The good thing is that we can often achieve concise syntax with sexps as
well, like:
(define-public python-httplib2
(hidden-package (package …)))
HTH!
Ludo’.