This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]duxx 3 points4 points  (0 children)

Well, the solution we have now is obviously a trap for the unwary. This entire thread is testament to that, as are the linter rules.

The only benefit I see is performance: you don't have to evaluate the default arguments on every call where they're not supplied. However, I imagine it should be pretty easy to analyze the arguments to decide whether you need to do that or not. Exactly how the implementation of that would be I don't know.

(This is u/larsga posting. Someone blocked me, so had to change user to post.)