Little language that compiles to JavaScript.

Earl Grey is a new language that compiles to JavaScript (ES6). Here's a quick rundown of its amazing features:

  • Python-like syntax
  • Fully compatible with the node.js ecosystem
  • Generators and async/await (no callback hell!)
  • Powerful, deeply integrated pattern matching
    • Used for assignment, function declaration, looping, exceptions...
  • A DOM-building DSL with customizable behavior
  • A very powerful hygienic macro system!
    • Define your own control structures or DSLs
    • Macros integrate seamlessly with the language
    • Macro libraries! Test with earl-mocha, build with earl-gulp, make dynamic pages with earl-react, etc.
fib(n) =
   var {a, b} = {1, 1}
   1..n each i ->
      {a, b} = {b, a + b}
   a

fibs = 0..10 each i -> fib(i)
print 'The first ten fibonacci numbers are {fibs.join(", ")}'
Information updated 08/28/15
View Comments