Open geostarling opened 4 years ago
Unfortunately literal collections in applicative position are not yet supported, and keywords are supported only if you declare them in advance (with cloture:declare-keywords
).
I think it is doable without having to resort to a full code walker, but I haven't worked out all the details yet.
Notably it's not as simple as tweaking the reader to look for literals in applicative position, because the idiom also needs to be recognized in the output from macros:
(defmacro example []
(let [m {:x 1}]
`(~m :x)))
(example) ; => 1
I have a hunch that thinking about the reader or macro expansion time is not the right direction for this. It needs to be in the evaluation rules, and maps and keywords etc. need to be functions there (whatever that means in implementation).
Hi,
I'm trying out cloture and I've noticed the keywords, maps and such cannot be used in applicative position like so:
Currently, only
works for me in so I assume there must be some support for keyword application already and it's a matter of tweaking the Lisp reader? I've only digged in sources a little bit though. Am I on the right track?
Amazing project by the way!
Thank you.