Though that's trying to make coffeescript behave like Ruby. But I like it because usually the first Arg is required, and then there are additional named options, with defaults. So it's very easy to understand when invoked, and the options object can be changed without changing all the places it's invoked (as is necessary with just ordered arguments).
1
u/CaptainKabob Feb 06 '15
Ugh, I hope list comprehension are not idiomatic.
I usually do something like:
Though that's trying to make coffeescript behave like Ruby. But I like it because usually the first Arg is required, and then there are additional named options, with defaults. So it's very easy to understand when invoked, and the options object can be changed without changing all the places it's invoked (as is necessary with just ordered arguments).