4 ms·
I've used CoffeeScript both for front-end projects and node.js backends, and node.js based command line scripts (similar to what is often done in perl). It work
by Kjeldahl 14y ago
I've used CoffeeScript both for front-end projects and node.js backends, and node.js based command line scripts (similar to what is often done in perl). It works great, but for things like command line stuff which typically runs synchronously, the CPS/callback style of programming gets really messy really fast. Using await/defer (as supported by IcedCoffeeScript) synchronous programming can be done cleanly, if you make sure you write all your own functions in a callback style, and then consistently use await/defer when you want to call them synchronously. Trying to mix the metaphors creates a huge mess; your own functions may be synchronous, but every lib you will be using will be async. Better to keep all functions - including your own - async, and then consistently call them using await/defer when you want sync behaviour.