Porting Common Lisp's feature expressions to Clojure(Script)

Showing 1-2 of 2 messages
Porting Common Lisp's feature expressions to Clojure(Script) r0man 7/27/12 5:28 PM
Hello Common Lisper's,

the Clojure Community is discussing right now the implementation
of Common Lisp's feature expressions (a.k.a. *features*, #+ and
#-) [1,2]. The goal is to allow branching of forms that require
special handling on different implementations of Clojure (in this
case, Clojure and ClojureScript).

Since I know this feature only from books (i'm new to Lisp) I
would like to gather some feedback from the Common Lisp

* Do you know about anything that you missed in Common Lisp's

* Did you had any problems with such a feature beeing implemented
at the reader level?

* Should this better be implemented as a macro?

* Anything to consider we haven't thought of yet?

Thank you, Roman.

[1] http://dev.clojure.org/jira/browse/CLJS-27
[2] http://dev.clojure.org/display/design/Feature+Expressions
[3] https://groups.google.com/forum/?hl=en&fromgroups#!topic/clojure-dev/LH8-1pui0H0
Porting Common Lisp's feature expressions to Clojure(Script) Elias Mårtenson 7/27/12 6:54 PM
I can address one of the quest, whether they are better implemented as a macro.  The answer to this is clearly no. In fact, it couldn't be implemented as a macro, because at the time the macro is evaluated, the symbols making up the expression has already been interned by the reader. Thus, if the form references any packages that does not exist in your environment, you would get an error in the reader, before your conditional expression has had the chance to run.