wartremover icon indicating copy to clipboard operation
wartremover copied to clipboard

Better explanation of why default arguments should be avoided

Open jedesah opened this issue 7 years ago • 2 comments

The explanation for why default arguments are a wart is pretty short and vague. Of course, users are welcome to disable that wart if they don't agree, but it would be nice to make a somewhat more compelling case for why default arguments should be avoided.

I think a simple example of a situation where default arguments causes an undesirable situation would make a big difference.

jedesah avatar Jul 02 '17 20:07 jedesah

See https://github.com/wartremover/wartremover/issues/116 for a more in-depth discussion of this wart.

ClaireNeveu avatar Jul 02 '17 20:07 ClaireNeveu

@ClaireNeveu Very interesting discussion! Someone (perhaps me) should distill that conversation and add that to the docs which would fix this issue 😄

jedesah avatar Jul 02 '17 20:07 jedesah