Code Monkey home page Code Monkey logo

Comments (6)

lynaghk avatar lynaghk commented on May 19, 2024

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.

cemerick avatar cemerick commented on May 19, 2024

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.

lynaghk avatar lynaghk commented on May 19, 2024

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.

cemerick avatar cemerick commented on May 19, 2024

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.

lynaghk avatar lynaghk commented on May 19, 2024

I say go for it, then.

from cljx.

cemerick avatar cemerick commented on May 19, 2024

Done. :-)

from cljx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.