Thursday, March 5, 2009

Trying scala...

... and my first problem was that I got the following error message:

scala type int in object Predef is deprecated

google didn't pull back a solution (at least not obviously), so the answer that I found instead was to use 'Int' as the type (trying java.lang.Integer, which was my first guess based on the scala doc for scala.Predef didn't work well when trying to do arithmetic expressions :-).

1 comment:

James Iry said...

The Scala type "scala.Int" is the same as the Java type "int" in terms of byte code generated, API compatibility, etc. The Scala type "scala.int" is synonym that exists for historical reasons - a well intentioned, but ultimately not useful attempt to make Scala look like Java. It has been deprecated and will be removed.