News for hackers. Stuff that matters.
Re:Javascript RORO pattern by cgdub on Monday November 01, 2021 @09:59PM (#29075964)
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");
Re:Javascript RORO pattern by cnasc on Tuesday November 02, 2021 @09:31AM (#29080906)
An alternate universe where Closure Compiler became the preferred way to build JS projects would be interesting.

Clojurescript made that choice, though in retrospect it kind of seems like they backed the wrong horse.