rspec/rules/S2219/csharp/comments-and-links.adoc

8 lines
765 B
Plaintext
Raw Normal View History

=== on 24 May 2019, 16:47:10 Andrei Epure wrote:
\[~nicolas.harraudeau] there's an interesting remark from a user (issue https://github.com/SonarSource/sonar-dotnet/issues/2424[#2424]) who says that it's actually better to perform ``++expr is object++`` rather than ``++expr != null++`` because of performance implications
=== on 24 May 2019, 17:15:38 Nicolas Harraudeau wrote:
\[~andrei.epure] It looks to me like this is a tradeof between readability and performance. Using ``++expr is object++`` to do a null check is more performant but less intuitive than ``++expr != null++``. We could simply accept both ``++expr is object++`` and ``++expr != null++``, explaining in the description the difference. What do you think?
include::../comments-and-links.adoc[]