== Why is this an issue? Using ``++[Int]().count++`` to test for emptiness works, but using ``++[Int]().isEmpty++`` makes the code more readable and can be more performant. The time complexity of any ``++isEmpty++`` implementation should be ``++O(1)++`` whereas some implementations of ``++count()++`` can be ``++O(n)++``. === Noncompliant code example [source,swift] ---- if (arr.count == 0) { // Noncompliant /* ... */ } ---- === Compliant solution [source,swift] ---- if (arr.isEmpty) { /* ... */ } ---- ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] ''' == Comments And Links (visible only on this page) === on 8 Jul 2016, 20:40:54 Ann Campbell wrote: https://github.com/realm/SwiftLint/blob/master/Source/SwiftLintFramework/Rules/EmptyCountRule.swift include::../comments-and-links.adoc[] endif::env-github,rspecator-view[]