Learn ClojureScript: Discovering Sequence Operations
I stopped using clojurescript around 2015, primarily because I was tired of searching for&#x2F;implementing clojure-idiomatic wrappers around the many javascript libraries out there. Put another way, I left clojure on good terms, and often missed its core functions, immutable data structures and lisp syntax when writing front-end applications. However, since then, javascript has changed a lot, specifically in terms of execution-suspending operators like async&#x2F;await&#x2F;yield&#x2F;yield*. Meanwhile, the core clojurescript team has almost completely ignored these developments, preferring the immutable seq abstraction over iterators, and the core.async channel abstraction over promises&#x2F;async iterators.<p>For this reason and this reason alone, I’ve personally stopped considering clojurescript as a viable technology or recommending it to others. I have no idea how comtemporary clojurescript developers interoperate with javascript libraries and built-ins which are now overwhelmingly promise-based when async. I am also incredibly skeptical of the core.async channel abstraction as an alternative to promises&#x2F;async iterators insofar as I think it is strictly inferior to both promises and async iterators because:<p>1. There’s no standard way to communicate error conditions.<p>2. There’s no logical separation between data producers and data consumers, and any code with access to a channel can take or put values.<p>3. There’s no way to communicate nil values insofar as core.async chose to use nil to represent end of iteration.<p>I do not understand the decision by the core clojure team not to support promises or iterators, because one of clojure’s main selling points was pragmatic interopability with host language features. Nevertheless, I infer it must be an intentional decision not to support them, insofar as it’s so easy to support new language features in clojure with macros. Maybe it comes from a desire to adhere to “functional programming principles,” but I’ve found async&#x2F;await, promises, and iterators&#x2F;generators to be incredibly useful, so much so that I am unwilling to give it up for clojure’s immutability or nicer syntax.