3 ms·
You might want to try out CoffeeScript with contracts: http://disnetdev.com/contracts.coffee/ http://disnetdev.com/contracts.coffee/ Compiles to beautiful Jav
by jnbiche 15y ago
You might want to try out CoffeeScript with contracts:
http://disnetdev.com/contracts.coffee/ http://disnetdev.com/contracts.coffee/
Compiles to beautiful JavaScript and gives programmers the ability to check types at compile-type. If you've never used it, I'd compare CoffeeScript to an amalgam of Ruby and Python, with a little Haskell thrown in (take a look at how you specify contracts, for example). If you like functional programming, you'll love CoffeeScript:
['fizz' unless i%3] + ['buzz' unless i%5] or i for i in [1..100]
(fizzbuzz one-liner from http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-Impress-Your-Friends.html http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-I...)
- epidemian 15y agoThat one-liner is awesome! But it also has some evil type conversions in the form of <array> + <array> = <string> hehe