On Thu, Nov 11, 2021 at 9:20 PM Yushuo Xiao <dev.x...@gmail.com> wrote:

> Thank you very much! I didn't know the set is not fixed. And thinking of
> them as an IR really helps.
>
> On Friday, November 12, 2021 at 12:15:39 AM UTC+8 johnbclements wrote:
>
>> That’s a true statement… but that set is by no means fixed.
>>
>
To nitpick a little, while it's true that the set of forms allowed in fully
expanded programs is not fixed, the last change was in Racket 6.3, adding
`(quote-syntax datum #:local)` and removing `letrec-syntaxes+values`:
https://docs.racket-lang.org/reference/syntax-model.html#%28part._fully-expanded%29

So, while not fixed, they are in fact quite stable, and the list of
identifiers is exposed through APIs like the `kernel-literals`
<https://docs.racket-lang.org/syntax/Library_Syntax_Classes_and_Literal_Sets.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._kernel-literals%29%29>
literal set for `syntax-parse` and, at a lower level,
`kernel-form-identifier-list`
<https://docs.racket-lang.org/syntax/syntax-helpers.html#%28def._%28%28lib._syntax%2Fkerncase..rkt%29._kernel-form-identifier-list%29%29>
and the `syntax/kerncase`
<https://docs.racket-lang.org/syntax/syntax-helpers.html#%28mod-path._syntax%2Fkerncase%29>
module. Authors of advanced macros that use `local-expand` and friends need
a general awareness of their shapes, e.g. to recognize definitions, splice
`begin`s, or recur into local binding forms, so changes have to be
unobtrusive to avoid breaking compatibility.

If you're interested in the low-level internals of Racket, you may also
want to read the manual section on Linklets and the Core Compiler
<https://docs.racket-lang.org/reference/linklets.html>.

-Philip

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0100017d121a0121-031c9bd8-10ec-45b2-84b3-91c93d4e19bc-000000%40email.amazonses.com.

Reply via email to