▲ | lloydatkinson a day ago | |
I don't really like this at all. I'm not familiar with Python but this kwargs sounds like it leads to inconsistency throughout usages of a function. In JS/TS it's a lot more conventional to use objects once you go past 2-3 arguments. Sometimes patterns from other languages are great in other languages (like, functional ways of modelling errors, making invalid state impossible, not using nulls, etc), but other patterns like the one shown here don't seem great. | ||
▲ | rafram a day ago | parent [-] | |
Hmm? “Use objects once you go past 2-3 arguments” seems to be exactly what this post is arguing for. (Which, as you say, is not novel and is common in browser APIs and other JS libraries.) Not sure what you’re disagreeing with. |