The Bawden paper is a really good paper that I hadn't read, yet.  Thanks!  I've 
been thinking about quasiquotation a lot lately as it relates to the 
syntax-constructor approach I've been considering for the vector API in project 
Panama.  In particular, the notion of nested loops that feed induction 
variables inward.  Originally I had thought that perhaps this was an issue that 
I could solve via 'libraryizing' loops in specialized forms (reduction, etc.) 
but now I'm not so sure.  Quasiquoting with variable fields seems like 
something one could construct over a combination of MethodHandle and VarHandle 
combinators.  The issue I'm trying to wrap my brain around right now is inward 
dependency, or inward variable capture that you'd see in something like:

for(int a = Z;;)
   for(int b = X;;)
      for(int c = Y;;)
         //a,b,c captured here.  How to model this dependency in a 

I suppose we can use a varargs/spreader/collector-based approach where the user 
track their captured variables using a scheme like De Bruijn[1] indexing or 
otherwise.  It's not something you can statically check, but those may be the 

Coincidentally, I "grew up" with a different flavor of quasiquoting from the ML 
and Haskell communities that involves staged compilation and concrete DSLs that 
were parsed and transformed back to the host language's syntax before the final 
state of program compilation.  Not sure how relevant that is to this topic, but 
here it is all the same[2].


[2] Mainland, Why It's Nice to be Quoted: Quasiquoting for Haskell

-----Original Message-----
From: mlvm-dev [] On Behalf Of John Rose
Sent: Tuesday, August 2, 2016 4:28 PM
To: Da Vinci Machine Project <>
Subject: FTR: good old paper on quasi-quotation

Related to some discussion at the JVMLS about quasi-constants (templates, 
constants with holes), here is the early history of quasi-quoting in computing, 
as reported by someone who was there.

Alan Bawden, Quasiquotation in Lisp (1999)

Also regarding the history of quasiquotes, I found this little gem, showing one 
of our own community, in his tender years, innocently confounding the Boffins 
of Quotation.

Boolos & Jeffrey, Logic, Logic, Logic (1999), p. 393

mlvm-dev mailing list
mlvm-dev mailing list

Reply via email to