Re:Be wary of functions which take several parameters of the...
by GordonS on Friday September 27, 2019 @06:13PM
(#21096724)
I'm not sure how @Too's example is any worse than named parameters - surely the point is that it's just as likely to transpose source/destination either way.
[ Parent
| on HN ]
Re:Be wary of functions which take several parameters of the...
by mlthoughts2018 on Friday September 27, 2019 @06:34PM
(#21096869)
I think the point is that it’s irrelevant, because type checking or type assertions would take place at the parameter ingestion step specifically to render transposing the arguments impossible.
Any solution could be screwed up on purpose if you’re imagining someone at an interpreter prompt getting the arguments wrong or omitting unit tests that verify a certain file is used as source and a different file as dest... which is why this kind of objection just totally doesn’t matter.