Comments (6)
Is there an advantage of the feature-expression syntax you proposed vs. metadata beyond the semantic cleanliness?
(Which itself is not obvious to me---isn't a form's expected runtime metadata about that form?)
Couldn't we do per-build features with metadata as well?
from cljx.
My basic thought is that different things should look different. When you're using cljx, ^:clj
and ^:cljs
are not metadata, even though they look like it. Maybe an argument can be made that they are metadata, just not of the runtime variety, but I think it's worth not getting into such subtleties.
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. ^:jvm
, ^:debug
, ^:only-for-customer-A
, etc.
from cljx.
I think that's a reasonable argument for switching to feature expressions.
How far do you want to take them?
Annotating forms with structured data and doing queries to determine what to include/exclude?
from cljx.
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 comment
, defmacro
, etc.
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.
from cljx.
I say go for it, then.
from cljx.
Done. :-)
from cljx.
Related Issues (20)
- polling rate HOT 2
- cljx leaking as dependency HOT 10
- Drop hooks
- Current file generation approach is broken with recent leiningen HOT 3
- Wrong test selector used with lein do clean, test HOT 2
- 0.5.0 release HOT 4
- 0.5.0: Seeing StackOverflowError HOT 2
- 0.5.0 fails to run cljx in sequence of prep tasks HOT 10
- cljx auto generates double output HOT 6
- Endless loop when used from :prep-tasks HOT 1
- Clojure REPL not working if CLJX 0.5.0 & CLJS 2665 on classpath HOT 2
- Catch up with latest ClojureScript HOT 2
- Leiningen 2.5.1 incompatibility of :plugins HOT 5
- Source directories from parent directories don't work HOT 2
- Error handling in cljx-compile
- Characters in a cljx file after #+clj HOT 2
- Environment variables HOT 2
- Break when upgrading from Cljx 0.4.0 to 0.6.0 HOT 4
- REPL integration fails with 0.5.0/0.6.0 but works with 0.4.0 HOT 4
- Requiring unused dependency? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cljx.