20 lines
439 B
Plaintext
20 lines
439 B
Plaintext
The meaning of a boolean parameter may seem perfectly clear when you first write a method call, but that meaning is likely to fade for you over time, and could be completely opaque to those who come behind you.
|
|
|
|
|
|
Instead, object literals should be used.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
widget.repaint(false); // Noncompliant; does this mean never repaint?
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
widget.repaint({immediate: false});
|
|
----
|
|
|