Live data from Hacker News

Scala: the Case for Correctness

arthur.gonigberg.com

61–63 of 63 posts

Re: Scala: the Case for Correctness

#61
post #5

It seems like these points are true of other Java alternatives as well. What about Ceylon, Fantom, and Kotlin?

Clojure and Scala are really the only alternative JVM languages to gain any traction since Sun/Oracle started promoting the JVM for languages other than Java.

Most of the other languages I've noticed mentioned in the comments so far (i.e. C, C++, Go, Ruby, Python, JavaScript, Haskell) don't target the JVM, and those that do just do it on the side.

Perhaps Ceylon or Kotlin will gain some traction and become a third alternative for the JVM -- all the other contenders have been around too long and lost momentum. I'd pick Kotlin over Ceylon since it can use the popular IntelliJ as a delivery platform.

Re: Scala: the Case for Correctness

#62

Earlier quoted context omitted.

> much in the same way that static typing provides a benefit over dynamic typing. A non-trivial number of people would dispute that ;-)

I don't think so, actually: in all the heated discussions I've had with people on the subject of static / dynamic typing, everybody agreed that static typing had significant benefits. What people don't agree on is whether these benefits are worth the cost. It's hard to argue in good faith that having the compiler catch mistakes rather than finding about them at runtime is a bad thing. It's perfectly possible to argue…

I agree with this. I also somethings think that I use the type system the most when I am refactoring/redesigning code and at that time I might be sending a bool instead of an int as someone wrote which is being caught by any good type system. Regarding the cost I think an optional type system, like in Dart, is intresting. You can do some prototyping or quick coding and then add types when you have some working code in order to develop fast, or you can use types all the time in order to be correct.

Re: Scala: the Case for Correctness

#63

Fair Warning, I worked with the other for some time, and have been having an out of band convo with him. One of the things I absolutely HATE about scala is operator overloading - and the excessive abuse of it. I ran into it just now using some library that used ==. A Case: List(1,2) == List(1,2); true Array(1,2) == Array(1,2); false The reason for this is obvious, list implements equals and does a deep compare. While…

This is absolutely my #1 complaint about Scala, and really it's more a complaint about the community. It's not just the operator overloading, but the overuse of operator characters instead of meaningful function names.

All of this leads to potential newcomers thinking Scala is some inscrutable mess of a language, and even old fogeys will have to scratch their heads.

Post reply on HN