Our great sponsors
-
immutable-js
Immutable persistent data collections for Javascript which increase efficiency and simplicity.
-
mori
ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Persistent data structures are, in my opinion, underrated. Not so much for every day programming tasks, but specifically for code that resembles planning/searching.
Here is one library I've heard of https://immutable-js.com/ . I don't know of others.
Great series of articles. I used this to write a persistent vector library in Nim: https://github.com/PMunch/nim-persistent-vector
voila.. took a bit longer, the code was "too slow"... turns out I was using the wrong branching factor!
https://github.com/tomprimozic/vector
My experience with ImmutableJS was to remove it and see performance go up by a factor of 100-200.
https://github.com/mschaef/react-matchstick/commit/070802b69...
This was something of a worst case scenario (and it was five years ago, so presumably things have gotten better) but it still underscores the need to carefully consider these tools before adopting them. Do they really offer enough (to your application) to be worth the associated costs in readability, performance, etc.
If the goal is to prevent mutation, maybe there are better ways to do that. If the goal is to really accelerate, it's worth testing. (At the very least, Clojure's vectors seem unlikely to provide a benefit if you're working with vectors of len<32.)