28 lines
600 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
widget.repaint(false); // Noncompliant; does this mean never repaint?
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
widget.repaint({immediate: false});
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]