On Mon, Jul 8, 2019 at 12:59 PM Kevin Forchione <lyss...@gmail.com> wrote:

> Hi guys,
> I’ve noticed that the library provides *some* syntax classes: id, str,
> char, expo… for various datatypes, but not all. Obviously being such a
> handy aspect of syntax-parse there’s probably a reason for this. Having
> spent a few days trying to roll my own for procedure I have to suspect this
> isn’t a simple thing.
>
> What’s the rationale in not reprinting them?
>

Mat.* and/or others will be able to answer this more definitively, but I
suspect the issue is that syntax-parse works at phase 1, a macro-expansion
(similar to "compile time") phase, as opposed to runtime.  As a result, the
thing that will be in that slot is an sexp like (lambda (x) x) instead of a
#<procedure>.  It's easy to tell that the sexp is not an identifier,
string, etc, but determining if it will produce a #<procedure> requires
actually evaluating it -- what if it was (and foo bar) or (* x 9) instead
of (lambda (x) x)?



> Kevin
>
> --
> 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/A1BC76B6-B8FA-4A4C-8A66-A2D467EE511A%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAE8gKof4Ty-yMd6tkBGb1oD4Nz1i-gPHvs-NruYodRuT54Qu7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to