Coffeescript Good and Bad
The past two weeks I have been programming in Coffeescript almost exclusively. So far I've build a web app, a trio of daemons, and a full widget framework w/ pub/sub hub. I've been through about 1k loc of Coffeescript now and have a fairly good handle on it's strengths and it's weaknesses. Once you've built a full suite of applications in a language using every feature there of, you really don't have any excuse for not forming an opinion.
- concision -> syntax for production of functions is a big improvement, not perfect but big
- yaml -> a slightly less big issue is yaml, being able to omit is handy
- () -> dropping of () for function application helps with limiting their use for precedence overriding!
- ... -> range, slice, and splice operators are handy, but argument splats are less usefull than they first seem
- object decomposition -> this is a nice to have, but I've been spoiled by pattern matching lingos still a little immature
- class -> class produces multiply wrapped objects which do a poor job at using the prototype chain and defeats more intelligent object usage
- :: -> manipulation of the prototype in this fashion violates no action at a distance, and is poor prototype based practice
- if then else -> hfs this is messed up, a good old ternary operator is desparatly missed
- ? -> while this ever so versatile word is a great concept, it however is defined poorly for catching cases where an object has a valueOf that is falsy
- extends -> implements basic inheritance but makes mixins and traits impossibly cludgey to implement
The fact that Coffeescript goes to such lengths to make classical inheritance sort of work, but fails to observe the idea of private state is to say the least annoying. More to the point, there are things Coffeescript does to create local variable scope which is defeated by still so heavily relying upon property manipulation.