I am exploring Scala language. One claim I often hear is that Scala has a stronger type system than Java. By this I think what people mean is that:
scalac
rejects certain buggy programs whichjavac
will compile happily only to cause a runtime error- certain invariants can be encoded in a Scala program such that the compiler won't let the programmer write code that violates the condition
Am I right in thinking so? If so, please point to articles/blogs/papers which illustrate such examples.