Closed issei-m closed 7 years ago
I was considering implementing this before, but decided against it as I did want people to use the Collection methods rather than built in stuff (this also goes for ArrayAccess).
If we decide to switch to Countable, we should probably just rename size
since it doesn't make sense to have both.
Is there a use case you came across that required this functionality? :) In my experience it's always more comfortable either to use the Collection
directly or shadow it as an iterable
- in both cases the Countable wouldn't help.
Indeed, as you pointed I've found no reason/benefit to implement \Countable either. Thank you for your opinion. I'm closing this in favor of you.
More useful.