3 ms·
Keyword arguments tend to lead to bloated functions that try to account for every possible situation. So they're unidiomatic when compared to C-style functions
by Retra 8y ago
Keyword arguments tend to lead to bloated functions that try to account for every possible situation. So they're unidiomatic when compared to C-style functions which tend to always do the same thing in the same way every time you call them.
Of course, I'm assuming you're imagining an implementation where you are allowed to omit keywords to set default values. Naturally if every argument is always required, you don't have this problem.
- _yawn 8y agoI mostly miss them for constructing objects with default values, yes. The alternative is the builder pattern, which involves a lot of boilerplate.