3 ms·
Moreover, you could also allow for something like passing a structure of parameters. clamp({min:2, max:5, x:3}) ^parameters can be rearranged as you see fit
by dyarosla 9y ago
Moreover, you could also allow for something like passing a structure of parameters.
clamp({min:2, max:5, x:3})
^parameters can be rearranged as you see fit
There! Now the programmer can decide what’s the way they want to call the function that makes the most sense to them.
- dvlsg 9y agoIf you use named arguments, can't you typically rearrange the order? Don't get me wrong, I use destructured arguments in js and it works fine, but I thought named arguments in other languages solve that particular issue as well.