Skip to content

Instantly share code, notes, and snippets.

@heath
Last active August 29, 2015 13:56
Show Gist options
  • Save heath/8919206 to your computer and use it in GitHub Desktop.
Save heath/8919206 to your computer and use it in GitHub Desktop.
developer learning clojurescript
Developer: Hi, I want to write a web application.
ClojureScript: Great!
Developer: Um… how do I get a reference to a DOM element?
ClojureScript: That depends.
Developer: On what?
ClojureScript: Well, are you going to use JavaScript directly, use Google’s Closure library, or try a ClojureScript library like Domina or Enfocus? There are also radical alternatives to manipulating the DOM like Pedestal and Om.
Developer: Uh… I don’t know.
Developer spends the next half-day evaluating the ClojureScript options.
Some days later:
Developer: Well, now I need to do something different. I need to use HTML5 IndexedDB.
ClojureScript: Great!
Developer: Is there a nice library for that?
ClojureScript: Sorry, you’ll need to stick to JavaScript or Google Closure. I hope you love callbacks and have brushed up on your interop skills.
Developer groans.
Even later:
Developer: Now I’d like to write a command line utility. I love Clojure, but its overhead is just too big. Can I use ClojureScript?
ClojureScript: Absolutely!
Developer: Great. How do I get started?
ClojureScript: Well, all you need to do is learn Node.js. You’ll find your interop and callback management skills handy.
Developer: I don’t suppose there are any ClojureScript libraries that will make this much easier?
ClojureScript: Nope, you’re on the wild frontier. There are some nice Node modules, though.
Developer considers using Python instead.
@bostonou
Copy link

@heath that makes more sense. Without knowing that this is in the context of comparing dart, I couldn't figure out what the point was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment