Clone this wiki locally
Welcome to Chlorinejs wiki.
How does it look?
Code readability over feature fullness
Chlorinejs is more a language for Clojure ecosystem than an independent one like Coffeescript or Livescript etc. You should learn Clojure properly to write good Chlorinejs pieces. Also, we recommend the choice of Clojurescript over Chlorinejs: only choose the Chlorinejs when the cost of Clojurescript really hurts you.
Chlorinejs is more a syntax transformer (but with macros!) than a smart compiler which understand your code. However, transpiling Chlorinejs is pretty fast.
Chlorinejs is like Scheme: it doesn't implement
namespacefeature. You can use nodejs/browserify's style:
(require xyz)to modularize. That may be inconvenient, but the benefit is that you need no
js/somethingprefixes, and the
You define macros on the fly: no need to have all macros in other script files (as with Clojurescript).
What are "Clojure habits"?
- Clojure/Lisp symbol names (hence naming convention).
reduceare there. Forget C-like manual
- Destructuring, multiple arity forms and
defmethodmake life easier.
- Writing docstring is surely a good habit.
- The functional style: all forms should return something. Don't waste time writing code blocks that don't really help.
- Simple unit tests with
is(on top of mocha & qunit; easy to do live-coding with testem)
- A port of core library means that you can use
concatetc work as you may expect.
- Macros are easy to write. Included
defnetc are Chlorinejs macros.
- A light-weight Atom implementation is available to separate identity and state.
- Try Chlorine in your browser (link) (source)
- Made some cool examples? Share them with the community just like those Showcases!
- Plan to learn Clojure if you haven't.
- Be creative, because Clojure is so powerful ;)
- Check out the Showcases above for examples.