-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop using metadata notation #10
Comments
Is there an advantage of the feature-expression syntax you proposed vs. metadata beyond the semantic cleanliness? |
My basic thought is that different things should look different. When you're using cljx, Yeah, we can do extensible per-build "features" with metadata, but we (and any user, perhaps unwittingly) will just end up impinging upon that "namespace" even more. i.e. even more metadata is subject to conditional elision, e.g. |
I think that's a reasonable argument for switching to feature expressions. How far do you want to take them? |
Definitely wasn't planning on going that far, at least not to start. I'm not sure many people actually want to "query" their code (various other higher-order projects aside); just the equivalent of a pile of defines (a set of enabled "features" per build), and I suppose an optional seq of transformation fns, (as it is now) so we can continue to provide sane defaults for cljs around In the end, the practical user experience won't change much at all, i.e. I'm guessing there's ~3 people that ever wrote new kibit rules for use with cljx. Two curated presets (one for each target) + a knob to add additional features / degrees of freedom should do it. |
I say go for it, then. |
…not-really-metadata keywords (fixes gh-10)
Done. :-) |
Hey @lynaghk (and whoever else). Following up on the spike of using sjacket (see the corresponding branch), a thought I'd like feedback on:
Since the Clojure reader isn't being used anymore, the e.g.
^:clj
tags don't actually denote metadata. It seems that cljx should stop using them, and perhaps adopt feature expression-style (née Common Lisp-style) tags e.g.#+clj
. sjacket currently parses these (properly) as reader literals, so matching and eliding/transforming their value portion is no more difficult than the^:clj
-style tags.Along with an option to define the "features" that are to be turned on on a per-build basis, this would make cljx a fairly general-purpose s-expression preprocessor.
Thoughts?
The text was updated successfully, but these errors were encountered: