4 ms·
that's its own kind of horrible though. now either all your functions just take single object parameters or you have to remember which ones. and I get javascrip
by asddubs 2y ago
that's its own kind of horrible though. now either all your functions just take single object parameters or you have to remember which ones. and I get javascript is light on checking what was passed is actually what was expected but this seems to somehow make that situation even worse still
- lolinder 2y agoTypeScript is the answer.
- mewpmewp2 2y agoIs there anything wrong with taking a single parameter?
- wruza 2y agoNever had an issue with “remembering” part. At first I hated js/ts for its runtime and legacy quirks, but shortly after getting used to them it struck me that it’s a practical language with as little religion as possible. They just look at something and make it useful. Without thinking how much horrible it could be if they only imagined it. The ([…, ]{…}) approach is called “options object” which is a separate entity and is very convenient compared to e.g. python’s semi-infinite arguments lists.