-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
This issue was originally filed by [email protected]
The most used predicate over a collection is: does it have anything in it?
But the interface provides only "does it have nothing in it", i.e. isEmpty.
This leads to lots of use of !foo.isEmpty, which is confusing as 1) it's a double negative 2) one negation happens before the main expression and the other after.
Suggestions:
+ New method, e.g. hasElements, hasItems
+ Or supplement bool some(bool f(element)) with default some((e) => true)
Discussed here:
https://groups.google.com/a/dartlang.org/d/topic/misc/MfYkrFP84dw/discussion
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug