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.
Can the Clojure set and maps syntax be added to other Lisp dialects?
syntax;lisp;clojure
Yes, they can be added. It is something you can do using reader macros. There is already #() for vectors, but you can define your own [...] macro:(set-macro-character #\] (get-macro-character #\)))(set-macro-character #\[ (lambda (stream char)                   (declare (ignore char))                   `',(apply #'vector (read-delimited-list #\] stream t))))CL-USER> [1 2 3]#(1 2 3)CL-USER> (aref [1 2 3] 0)1CL-USER> Look at closer-apl for more&cooler examples.