Open anaelChardan opened 7 years ago
we discussed that. we have decided not do it. Forcing the selection of MutableCollection or ImmutableCollection might not be the "PHP way". We could play with traits and have Collection and ImmutableCollection. We could reconsider, it is a good subject.
Yes, I know, but I'm always frustrated as I don't the name of functionnal methods when it is mutable. When we come from Java world or Scala world, we're aware about that :) http://docs.scala-lang.org/overviews/collections/overview.html. And it is better to separate them as they have not the same purpose.
IMHO, it's quite difficult to remember which function is mutable and which function is not
It could be nice that Collection can be split into MutableCollection and ImmutableCollection with the same name in functions (due to an interface contract).