Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JS promise libraries are slow because they're poorly factored and constrained by the limitations of the JS runtime environment and the low quality of typical JS code. Don't extrapolate from the miserable experience of using promises in JS to assume that promises are useless as a programming construct.

core.async looks interesting though; I assume I can't just consume it as a library and instead must rewrite my whole application in (clojurescript? you literally never mention in this post what language that is)? Too bad, but I can see how for this type of thing you need compiler support.



I haven't tried it yet but you can use clojurescript functions from javascript. The more common direction of interop (from using js from clojurescript) is quite nice and it looks like the opposite is also quite nice.

Best writeup about that I've seen so far is here: http://lukevanderhart.com/2011/09/30/using-javascript-and-cl... (in the exporting section)

I'm not sure if there are any implications I'm not aware of that would make it less useful to use core.async from js land.


> (clojurescript? you literally never mention in this post what language that is)?

For clarity, core.async is a library that can be used in both Clojure and Clojurescript. There are internal implementation and performance differences, but the behavior of the library is the same for both.


core.async is a Clojure library and is built with no compiler support.


To be fair, a lot of the syntax magic of core.async happens in its macros -- in js that is supported by the cljs compiler. As I understand it, because of this it'd be impossible for core.async to be used as a js "library" (a global namespace with a public interface).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: