CokeScript

When CoffeeScript is not enough. Github

CokeScript is a simple whitespace sensitive language that compile to JavaScript inspired by Python and Ruby. CokeScript doesn't try to be too smart and is mainly syntactic sugar around common JavasScript annoyances. Features:

  1. Significant whitespace
  2. String interpolation
  3. Multiline strings
  4. Shorter function declaration and lambda expression
  5. Function parameters can have a default and computed value
  6. Simple for loop syntax that works on Array or Object
  7. Sensible scoping rules unlike CoffeeScript
  8. Classes with "classical" inheritance
  9. Opiniated syntax rules that enforce a rigid coding style
  10. A quite good grammar parser that hints about what is wrong
  11. Virtual Dom support directly within the language
  12. A rather compact source code which is smaller than 1000 lines of code

More info on the github page https://github.com/batiste/CokeScript/

Classes


JavaScript Output


Scope



JavaScript Output


Functions and Loops



JavaScript Output


Virtual DOM support

CokeScript support the virtual-dom library for React-Like features.

JavaScript Output