On Friday, November 14, 2014 7:22:39 PM UTC-8, Colin Fleming wrote:
> Hi all,
>
> There's a discussion going on right now on clojure-dev
> (https://groups.google.com/d/topic/clojure-dev/6pnIeXFRwnI/discussion) about
> the Feature Expressions functionality currently slated for Clojure 1.7. This
Hi Colin,
CLJX definitively does the job but at the price of being very brittle and
having to juggle with paths and classpaths. Also this is a leaky hack as
you have to make all tooling aware of it (editor, nrepl, ..). It usually
sort of work up to the point it doesn't. CLJX does the magic by gene
I didn't ask for feature expressions in the survey, but I've been wishing
for a better way for writing cross-target code, especially libraries.
I've never quite managed to bring myself to develop with cljx - I love it
as a consumer of libraries, but I haven't quite managed to make it wo
wellrk in
I apologize if this is naïve and/or incomplete; I'm very new to Clojure.
Would a better solution be to use something closer to protocols and
multimethods, where functions could be "polymorphic" by platform rather
than polymorphic by arguments?
This would make it open for users to add support for p
Feature expressions would allow for this by allowing you to define the
function multiple times, once per platform. Something like this (cljx) code:
#+clj (defn foo [] (println "Clojure implementation")
#+cljs (defn foo [] (js/console.log "ClojureScript implementation")
On 15 November 2014 14:59,
Ah, OK. It'll be interesting to see how this turns out.
Andrew Oberstar
On Sat Nov 15 2014 at 9:40:45 AM Daniel Kersten wrote:
> Feature expressions would allow for this by allowing you to define the
> function multiple times, once per platform. Something like this (cljx) code:
>
> #+clj (defn
On Saturday, November 15, 2014 4:56:04 AM UTC-8, Daniel Kersten wrote:
> I didn't ask for feature expressions in the survey, but I've been wishing for
> a better way for writing cross-target code, especially libraries.
I agree - I once modified a clojure library, using cljx, to make it
clojuresc
On Saturday, November 15, 2014 1:35:48 PM UTC-8, Alan Moore wrote:
> On Saturday, November 15, 2014 4:56:04 AM UTC-8, Daniel Kersten wrote:
>
> Unfortunately, feature expressions (or cljx) seem to be needed for some very
> common use cases - specifically I'm thinking of the lack of macro support