Nested quasiquotes don't work #32

Closed
dido opened this Issue Jan 22, 2012 · 5 comments

Projects

None yet

2 participants

@dido
Owner
dido commented Jan 22, 2012

arc> (eval ``(+ 1 ,,@(list 2 3) 4))
Error: Unbound symbol: _unquote-splicing

Presumably we want the above form to evaluate to (+ 1 2 3 4) the way Common Lisp would, as opposed to the '(+ 1 2 4) that Scheme (erroneously) produces.

@dido dido was assigned Jan 22, 2012
@akkartik

👍

Do you remember what scheme gave that result? On racket:

> ``(+ 1 ,,@(list 2 3) 4)
'`(+ 1 (unquote 2 3) 4)

(Wart gets it right :)

@dido
Owner
dido commented Apr 25, 2013

Off hand can't quite remember. I think it was an older version of Scheme48, as the present version I have installed right now (two computers and four OS reinstalls later) doesn't do it.

@dido dido closed this Apr 25, 2013
@dido dido reopened this Apr 25, 2013
@dido
Owner
dido commented Apr 26, 2013

(+ 1 2 4) is what current reference Arc does when presented with (eval ``(+ 1 ,,@(list 2 3) 4)). Not sure why it does that.

Found an old discussion on this very topic:

http://arclanguage.org/item?id=9962

Looks like the code linked to there might be the basis for Arcueid's new quasiquote algorithm.

@akkartik

Holy crap, you're right! Anarki is the same. I could swear this was fixed at some point. Perhaps on the arc2 branch?

@dido
Owner
dido commented Apr 29, 2013

Nested quasiquote behaviour now obeys Common Lisp semantics as of a2f07b0

@dido dido closed this Apr 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment