Closed theSherwood closed 4 years ago
For the most part, no.
{}
is just a JS Object
and a []
is a JS Array
etc. There is no support for persistent data structures as far as I know.lazy-seq
operator but I have never used it myself.atom
or defer
.It really is simply "homoiconic Javascript" and is best programmed as such - e.g. writing JS code with a LISP syntax. There might be npm modules which support some of the features you're after for JS, and will thereby work with Wisp too. Good luck!
Thanks for the heads up! Very cool project.
Wisp is so good at integrating with JS, I'd recommend using a JS package (like Immutable.js) for lazy sequences and persistent data structures.
@zot I think I will do. Just need to find the right project!
Wisp is so good at integrating with JS, I'd recommend using a JS package (like Immutable.js) for lazy sequences and persistent data structures.
For what it’s worth intention always was to implement clojure like persistent data structures as separate libraries that could be pulled in so that by default compiled program is as close to hand written JS as possible.
In other words I’d also recommend using Immutable.js or mori for persistent data structures.
As of atom
/ defer
that also could be implemented as user space library (although it might require some reader macros in wisp for clojure API compatibility, which should be fairly easy to add)
Wisp is so good at integrating with JS, I'd recommend using a JS package (like Immutable.js) for lazy sequences and persistent data structures.
For what it’s worth intention always was to implement clojure like persistent data structures as separate libraries that could be pulled in so that by default compiled program is as close to hand written JS as possible.
In other words I’d also recommend using Immutable.js or mori for persistent data structures.
As of
atom
/defer
that also could be implemented as user space library (although it might require some reader macros in wisp for clojure API compatibility, which should be fairly easy to add)
When I investigated persistent data structure JS libs 5 years ago or so (I think), my impression at the time was that Immutable.js
was much better than mori
in terms of performance and comprehensiveness. This may have changed but that's my 2 cents -- your mileage may vary. I'm very interested in other people's impressions because I'm always looking for good libraries (like qiao's fingertrees
, for instance, which have good lazy behavior).
When I investigated persistent data structure JS libs 5 years ago or so (I think), my impression at the time was that
Immutable.js
was much better thanmori
in terms of performance and comprehensiveness.
Interesting several years ago I was also comparing two and was under impression that mori did much better in performance and memory usage, especially on larger data sets, than immutable.js did. But it did feel pretty awkward to us it from JS, so I end up still choosing immutable.js.
I also happened to grow fancy of static type systems and neither of them really had an API that allowed you to take a good advantage of type inference.
I am also kind of curious how these libraries compare these days or if there are options that work better with type checkers.
Hi folks, Wisp looks really fascinating. I just wanted to check if it had a few features that I haven't been able to find in the docs. Does it have persistent data structures? Does it have lazy sequences? And does it have reactivity through Clojure-like atoms?