jashkenas/coffee-script — Issue #2019: Default values for destructuring assignment in parameter list
Author: johnnywengluu
Created: 2012-01-09 07:50:22+00:00
State: open

Would giving the option to have default values for destructuring assignment in the parameter list be a cool feature?

Eg.

f = (name: name = "Foo Bar", age: age = 20, [hobby = "Soccer"]) ->
console.log name # Foo Bar
console.log age # 30
console.log hobby # Soccer

f age: 30