As title of this question suggests: my question is more about form (idiomatic convention) than function. Put Succinctly:
What is the semantic difference between
MyCollectionLike
andMyCollection
?
As examples: What is the difference between StringLike
and String
or MapLike
and Map
. Looking closely at the Scala API docs, I can tell that XLike
is typically a super-type of X
. But, beyond that, I am not clear on the semantic difference between these layers of abstraction.
In practice, If I were creating a new class/trait, understanding this distinction would be helpful when I am choosing names for said class.
My specific problem, where this has come up is as follows:
I want to create the trait:
SurjectiveMap[K, T]
which can be mixed-in with eitherMap[K, Set[T]]
orMapLike[K, SetLike[T]]
. Given that I do not know the semantic difference between*Like
and*
, I am not sure which to go with.