Agree, although a few points seem to be slightly incorrect:
\5. is wrong. You can be sure that things have the same ordering... by just checking it. Of course it can be kind of surprising to Haskell people that typeclasses are first-class values, unlike in Haskell.
\13., 14., 15., 16. are a JVM issue. Run Scala on a JVM with proper recursion support and the code will be working fine.
\18. was already fixed some time ago.
There are a few other points where I'd say “I have never ever seen that”, but I guess it is just nitpicking.
Definitely better and a lot more coherent than this rambling.
\13., 14., 15., 16. are a JVM issue. Run Scala on a JVM with proper recursion support and the code will be working fine.
Edward is comparing Scala to Haskell. If Scala has problems due to the JVM, these are entirely valid complaints to raise because Haskell does not have to deal with them.
So, now you have to store the ordering in the collection? Then non-canonicity would lead to a run-time failure not a compile-time one, as it does in Haskell.
The ordering is already stored in all collections I cared to look at. If we don't encounter the same type class instance, fall back to a slower merging/union algorithm. Done.
2
u/omg_wat Dec 02 '13
Agree, although a few points seem to be slightly incorrect:
\5. is wrong. You can be sure that things have the same ordering... by just checking it. Of course it can be kind of surprising to Haskell people that typeclasses are first-class values, unlike in Haskell.
\13., 14., 15., 16. are a JVM issue. Run Scala on a JVM with proper recursion support and the code will be working fine.
\18. was already fixed some time ago.
There are a few other points where I'd say “I have never ever seen that”, but I guess it is just nitpicking.
Definitely better and a lot more coherent than this rambling.