• Scala is compatible with Java. Java libraries and frameworks can be used without glue code or additional declarations.
  • Definitions start with a reserved word.
    • Function definitions start with def
    • variable definitions start with var
    • values (i.e. read only variables) start with val.
  • The declared type of a symbol is given after the symbol and a colon.
    • The declared type can often be omitted
  • Array types are written Array[T] rather than T[],and array selections are written a(i) rather than a[i].
  • Functions can be nested inside other functions.

    • Nested functions can access parameters and local variables of enclosing functions.
  • it is possible to write programs in a conventional imperative or object-oriented style. However, it is also possible to write programs in a style which looks completely different.

results matching ""

    No results matching ""