[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] ANN: first draft of R7RS small language available
On Fri, May 6, 2011 at 10:48 PM, Jim Rees <jimreesma@x> wrote:
>
> Surely, that's not what you got in mzscheme -- typo? When I type that into
> mzscheme v4.2.2, I get:
> => ((unquote-splicing (list + 1 2)))
Yes, that's what I got indeed. Sorry about that.
My example was broken in several different ways anyway so I prepared
another one, hopefully correct:
(let ((not-unquote apply))
`((unquote + (list 1 2)))) => (#<procedure:+> (1 2))
(let ((unquote apply))
`((unquote + (list 1 2)))) => ((unquote + (list 1 2))) ; plt-scheme
(R6RS mode) (1)
(let ((unquote apply))
`((unquote + (list 1 2)))) => (#<procedure:+> (1 2)) ; isn't it a
desired output (because of referential transparency)? (2)
(let ((unquote apply))
`((unquote + (list 1 2)))) => ((apply + (list 1 2))) ; or this
(because of macro hygiene)? (3)
After all we can rebind anything else just fine:
(let ((+ -))
`((unquote + (list 1 2)))) => (#<procedure:-> (1 2))
> ...which makes the most sense to me.
Can you explain why is this a desirable output? I'm just wondering if
this is a subtle bug in plt-scheme, my lack of understanding of R6RS
or an inherent issue with it.
After all the discussion in this thread I'm in favor of (3) (which
essentially means that UNQUOTE being an identifier). (2) would be the
behavior with keywords being matched by name. (1) is somewhere in
between.
Andrzej
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports