Add clojurescript support

Description

With the upcoming release of Clojure 1.7 and reader conditionals, is there interest in adding ClojureScript support? There is already a port at https://github.com/tailrecursion/cljs-priority-map. Alan Dipert may be interested in donating that to Clojure Core, otherwise I would be interested in working on a port.

Environment

None

Activity

Show:

Alex Miller November 30, 2015 at 3:57 AM

FYI, currently our Hudson CI system that is used to do builds of contrib projects cannot build cljc projects. To build, a new version of clojure-maven-plugin is required, which requires Maven 3 for some of the required plugins, which is not supported in the old version of Hudson we're using.

This is fairly high in my priority list as we are already fighting this issue for test.check (and it's only a matter of time before it's needed for others as well). But you might want to hold off till we've addressed this issue.

It is possible to manually build and release projects without the CI server (and I've done this for test.cehck), but it's no picnic.

Mark Engelberg November 28, 2015 at 10:07 PM

Yes, I'm fine with a minimum supported version of 1.7.

Tim Visher November 26, 2015 at 12:58 PM

I think it's worthwhile if only because that would give 'official' contrib support to clojurescript. I'm mostly interested in this because I need a priority queue in a project I'm on and I'd also like to experiment with cljc. So this is partly a learning exercise and partly a practical effort.

That said I am quite surprised at how different the type declarations are. I was assuming I'd be able to just swap out some types using #? but the implementations are quite different. I can't decide yet how much of it I'll be able to unify, but I'm hoping it's quite a bit.

So I guess whether you accept it or not I'd like to go through the exercise.

I assume implicit in what you've said above is the acceptance of a minimum supported version of 1.7?

Mark Engelberg November 18, 2015 at 5:52 AM

I said in my earlier comment that, "I think it is worthwhile," and that comment was driven entirely by the sense that "cljc is what modern Clojure libs are expected to do". But the more I think about it the more I realize that it's not entirely clear what we gain by merging the clojure and clojurescript versions, especially since this code is almost exclusively about implementing protocols and interfaces that are completely different between Clojure and Clojurescript, so there is very little code in common. It's also unclear, since the code has so little in common, that it will be any easier to maintain or extend the code in one combined file versus two separate files. On top of that, priority map has changed very little in the past several years since its creation, and will likely have very few changes in the future.

Therefore, I'm starting to feel skeptical that it is worth the effort and the risk of introducing bugs, but to the extent that you're interested in exploring this issue, I think cljc is the way to go.

So before you dive into it, let me ask you your opinion: what are the gains of mashing the two files together into one cljc file?

Tim Visher November 17, 2015 at 11:24 PM

What would we like to do as far as clojure version support? If we were ok with dropping support for version prior to 1.7 then I could use `cljc` to target both platforms. If we want to maintain support for prior versions then I'll have to use a different approach.

Thoughts?

Details

Assignee

Reporter

Priority

Created May 6, 2015 at 1:28 AM
Updated November 30, 2015 at 3:57 AM