Bob Nystrom
Bob Nystrom
> The default value of a boolean parameter is inherently part of a method's public API in a way that it's not for other types I recall that this is...
What about cases where a boolean parameter is being forwarded? ``` dart foo({bool param}) => bar(param: param); bar({bool param}) => ... ``` Here, using a default value in `bar` would...
> `foo()` is still explicitly deciding what the default behavior will be for its call to `bar()`. How? Note that `bar()` doesn't have a default value so the `null` will...
> In other words, the default values of parameters should always be part of the interface, and they should never be allowed to change in a subclass or subtype. Exactly...
> So, I'd prefer to remove default values from function signatures. +1! I'm curious to see how many optional parameters people would still use if Dart supported overloading. My hunch...
> Without these contracts it may be considerably more complex to determine why a particular piece of code breaks when we upgrade to a new version of some packages This...
Umm... I don't know of any docs on it. :-/
I've never used the `avoid_positional_boolean_parameters` lint myself, but I wouldn't be surprised that there are exceptions. There's a reason it's not a hard rule. Personally, I think it's probably just...
Natalie and I don't currently have any plans to add linting to pub itself. It would be nice, but it's really unlikely we'll find the time to do it this...