|
|
|
|
|
by cgdub
1685 days ago
|
|
If you use a sufficiently smart JS optimizer, it will optimize the object creation and destructuring away. For example, Google Closure Compiler can take function hello({name}) {
alert('Hello, ' + name);
}
hello({name: 'World'});
and compile it into alert("Hello, World");
|
|
Clojurescript made that choice, though in retrospect it kind of seems like they backed the wrong horse.