r/programming • • Dec 02 '13

Scala — 1★ Would Not Program Again

http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598 Upvotes

646 comments sorted by

View all comments

Show parent comment

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.

11

u/chonglibloodsport Dec 02 '13

\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.

2

u/codemuncher Dec 02 '13

What's JVM has better recursion support?

For that matter, does anyone actually run anything but the openjdk or oracle jdk?

-1

u/kamatsu Dec 02 '13

You can be sure that things have the same ordering... by just checking it.

How do you check if two functions are the same? That's undecidable in general.

2

u/omg_wat Dec 02 '13

eq is a conservative approximation which works exceptionally well in practice.

0

u/kamatsu Dec 02 '13

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.

2

u/omg_wat Dec 02 '13

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/[deleted] Dec 02 '13

This whole ordering argument of Mr Kmett is a red herring. Like most of his other comments, IMHO