Hacker News new | ask | show | jobs
by garyclarke27 297 days ago
Looks good but what about Named Parameters? Why on earth is Javascript still missing such an important feature? I know you can kind of fake it with objects, but is clunky in comparison.
2 comments

That's actually a benefit. It allows the type signature to be used to compose and verify what you're passing to a function, and to use that same interface in other places.
Exactly because of that, it would only cut the curly brackets.

Also it is the same approach done in C and C++, another two languages where being clunky is a something we got used to.

Rust has the same issue. In practice it’s just not a big deal, I think about it maybe once every six months or so.