At Sun, 4 Mar 2018 20:01:56 -0800, Alexis King wrote:
> While it’s a bit of a tangent, I’d be quite interested to finding more
> information on this alternate model of hygiene from anyone familiar with
> the tradeoffs (the SRFI that describes it does not include much in the
> way of comparisons). Are there strong reasons to prefer Racket’s model
> aside from backwards compatibility and mild convenience when
> procedurally assembling pieces of syntax?

Adding to Ryan's answer, I note that Andre van Tonder's SRFI-72 system
has `quasisyntax` is a primitive. That is,

  #`(x #,y x)

is not like

 (datum->syntax #'here (list #'x y #'x))

because the scope introduced by a `quasisyntax` spans the whole
`quasisyntax` form and causes nested `syntax` forms to not introduce a
fresh scope.

Is `quasisyntax` special enough to be built in? What about other
syntactic forms that would be naturally implemented with multiple
`syntax` (or `quote-syntax`) forms?


Looking back, I see that SRFI-72 at one point included a
`with-fresh-renaming-scope` operation that very close to (or maybe
exactly) what I had in mind by "applying a fresh scope to a textual
region of syntax literals":

  https://srfi.schemers.org/srfi-72/srfi-72-1.3.html

To me, that seems like a way to pull the specialness out of `syntax`
and `quasisyntax`, although it also seems inconvenient to have to write
`with-fresh-renaming-scope` explicitly (which that connects to Ryan's
comments on `syntax-protect`).

But I haven't looked in detail, and I may be mixing things up. You may
find something in the SRFI-72 discussion on why that direction was
abandoned.

-- 
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