3 ms·
You actually mean statically typed. Scala is only limitedly type-safe, and is certainly not type-theoretic type-safe at all: $ cat NotTypesafe.scala
by benburton 13y ago
You actually mean statically typed. Scala is only limitedly type-safe, and is certainly not type-theoretic type-safe at all:
$ cat NotTypesafe.scala
object NotTypesafe {
def main(args: Array[String]) {
println("5".asInstanceOf[Int])
}
}
$ scalac NotTypesafe.scala
$ scala NotTypesafe
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
http://en.wikipedia.org/wiki/Type_safety http://en.wikipedia.org/wiki/Type_safety
- auggierose 13y agoWell, I've got a PhD in computer science, I just use the words as I please. But yes, you are right ;-)
- warcher 13y agoI bet this comment read differently in your head.