I've wanted to create macro in this way:
So I've created cl-rttemplate which works in a similar way as quasiquoting, but in the read-time. Then the macro looks like this (for details go to the homepage of project):
(defmacro nlet ((&rest vars) &body body)
`(let ,(loop for var in vars collect `(,(first var) (#_new ,@(rest var))))
,@body))
Where #_ is the commonqt reader macro. Of course, it doesn't work.So I've created cl-rttemplate which works in a similar way as quasiquoting, but in the read-time. Then the macro looks like this (for details go to the homepage of project):
(setf (readtable-case cl-rttemplate:*rt*) :preserve)
(defmacro nlet ((&rest vars) &body body)
`(let ,(loop for var in vars collect `(,(first var) #"(#_new " #@',(rest var) ")"#))
,@body))
So what do you think about it? Or would you have a better solution?cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version). Temporary mirrors of aferomentioned: CLHS and a dark version.