top | item 44960294

(no title)

garyclarke27 | 6 months 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.

discuss

order

dtagames|6 months ago

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.

pjmlp|6 months ago

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.

Klonoar|6 months ago

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.