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

8 lines
763 B
Plaintext
Raw Normal View History

=== On 2019-05-24T16:47:10Z 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 2019-05-24T17:15:38Z 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[]