Posts

Showing posts from August, 2013

I moved a 4000 line coffeescript project to typescript and I liked it

TLDR: jump straight to the TypeScript section About 8 months ago I started a new complex web app in javascript, and it quickly grew out of hand. It had: a server with routes a singleton object with state, logic and helper functions a bunch of similar plugins that extend functionality the singleton object lives both on the server and on the client Very soon I decided that javascript allowed too much patterns. I wanted modules, classes and easy binding on the this keyword. Someone recommended CoffeeScript and I went with it. The codebase expanded to about 4000 LOC in a matter of weeks. So CoffeeScript hm, what about it? These are my experiences after maintaining a non-trivial coffeescript application for a couple of months. Pros: Programming was quicker, stuff you want is already in the language. (classes, inheritance, array comprehension, filters) Less verbose. for k,v in object fat arrow "string interpolation #{yes.please}" Cons: fat arrow is ve