3 ms·
I’m glad named args aren’t in JS/TS. Objects are good enough and it would add complexity for minimal reward.
by andrewstuart 3y ago
I’m glad named args aren’t in JS/TS.
Objects are good enough and it would add complexity for minimal reward.
- jcelerier 3y agoPassing objects is less efficient than passing individual arguments in multiple ABIs though, even if the straight byte count would be the exact same
- The_Colonel 3y agoABI is not a concern for JavaScript.
- jcelerier 3y agoEven if JS does not have a "public" ABI, I'm pretty sure passing an integer will be faster than passing a new temporary object in at least multiple JS implementations.