Le vendredi 3 février 2017 10:56:10 UTC+1, Laurent Orseau a écrit :
> Btw, with "Macro Hiding: Disabled" we can see that after foo is turned into 
> #'1 (printed '1' in the macro stepper), then the 1 is 'tagged' with (#%datum 
> . 1) and then right after that turned into (quote 1). Is the tagging step 
> necessary for numbers?

Yes, self-quoting values like numbers, vectors, booleans, strings etc. are 
wrapped with (#%datum).

This is an extension point which allows languages to decide what to do with 
such values. For example, a language could disallow the use of some kinds of 
data, by making #%datum throw an error. This could also be used to treat the 
contents of vectors as expressions, so that (let ([x 1]) #(x x x)) produces #(1 
1 1).

Similar extension points are #%top, which is wrapped around unbound variables, 
and #%app, which is prepended to all function calls.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to