views:

761

answers:

3

Scala is a wonderful language, but I wonder how could be improved if it had it's own runtime?
I.e. what design choices were made because of JVM choice?

+20  A: 
VonC
Note to self: that list of types is detailled (with links) in http://stackoverflow.com/questions/3112725/advantages-of-scalas-type-system/3113741#3113741
VonC
+16  A: 

This article is a discussion with Martin Odersky (Scala's creator) and includes the compromises that were made in Scala for compatibility with Java. The article mentions:

  1. Static overloading of methods
  2. Having both traits and classes
  3. Inclusion of null pointers.
Ben Lings
Excellent reference. +1
VonC
+2  A: 

Less an issue with the runtime than a cultural hangover: universal equality, hashing, toString.

More deeply tied to the VM: strict by default evaluation, impure functions, exceptions.

retronym
+1 for universal equality and hashing. What's wrong with universal `toString`?
missingfaktor
1) It's easy to accidentally display `Object#toString` to a user. 2) `Collection[A]#toString` is inflexible in the way it displays elements of type `A`. See `scalaz.Show` for a alternative.
retronym
Okay. Thanks for the response.
missingfaktor