Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The sad thing is that it actually does a lot more than that, but the docs are gloss over or omit a lot of the subtle headache relief CoffeeScript provides. For example, in addition to making regular expressions readable by allowing a block syntax, it also allows regex interpolation, so this code:

  blah = "crayfish"
  pat = ///#{blah}///
is equivalent to:

  pat = /crayfish/
This is in the docs, but if you blinked, you'd miss it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: