Try to avoid abstract and native methods in abstract classes as much as possible
#29 opened on Nov 9, 2019
Repository metrics
- Stars
- (8 stars)
- PR merge metrics
- (PR metrics pending)
Description
Extracted from discussion on #26 .
This ticket is being made specially thinking in Collections, but might apply to other places.
Currently, collection defines many abstract and some native methods (such as findOrElse(predicate, continuation)).
I believe it would be a better idea to implement as many as these methods as possible, even if it's in a naive way. This would allow some implementations to delegate on this implementations if performance is not an issue and would provide good defaults for new Collection subclasses.
Well known subclasses as Set, Dictionary and List could override these methods with natives as needed, so there would be no performance impact.