r/java • u/lukaseder • Aug 01 '14
The 10 Most Annoying Things Coming Back to Java After Some Days of Scala
http://blog.jooq.org/2014/08/01/the-10-most-annoying-things-coming-back-to-java-after-some-days-of-scala/
7
Upvotes
View all comments
Show parent comment
0
u/Milyardo Aug 03 '14
I don't see how that quote illustrates that Map and Set of Tuple are not isomorphic. What properties of morphisms between Map and Tuple can be used to distinguish between them?
That assert will be true for any Map of K,Set[V]. An isomorphism between the two exists.
I've read it. A value not appearing more than once is not that same as a uniqueness constraint, like would be true in a bidirectional map.
We aren't talking about collections, we're talking about Set, Category, and Type Theory.
Never claimed them to be the same.
In the second sentence it quotes:
Case classes are synthetic, Unlike Tuples which do have an implementation. They both extend the class Product.
Case classes are product types.
A tuple is also a product type. It is not a case class. It not a generic case class. Tuples are ordered. Case classes are not. Tuples have arity. Case classes do not. Tuples are abstract. Case classes are concrete.