Can the Clojure set and maps syntax be added to other Lisp dialects?
Posted
by
Cedric Martin
on Programmers
See other posts from Programmers
or by Cedric Martin
Published on 2012-07-03T12:35:20Z
Indexed on
2012/07/03
15:24 UTC
Read the original article
Hit count: 372
In addition to create list using parentheses, Clojure allows to create vectors using [ ], maps using { } and sets using #{ }.
Lisp is always said to be a very extensible language in which you can easily create DSLs etc. But is Lisp so extensible that you can take any Lisp dialect and relatively easily add support for Clojure's vectors, maps and sets (which are all functions in Clojure)?
I'm not necessarily asking about cons or similar actually working on these functions: what I'd like to know is if the other could be modified so that the source code would look like Clojure's source code (that is: using matching [ ], { } and #{ } in addition to ( )).
Note that if it cannot be done this is not a criticism of Lisp: what I'd like to know is, technically, what should be done or what cannot be done if one were to add such a thing.
© Programmers or respective owner