31 March 2013

Scala smoothly integrates object-oriented and functional programming. It is de-signed to express common programming patterns in a concise, elegant, and type-safe way. Scala introduces several innovative language constructs. For instance:

  • Abstract types and mixin composition unify concepts from object and module systems.

  • Pattern matching over class hierarchies unifies functional and object oriented data access. It greatly simplifies the processing of XML trees.

  • A flexible syntax and type system enables the construction of advanced libraries and new domain specific languages.

At the same time, Scala is compatible with Java. Java libraries and frameworks can be used without glue code or additional declarations.

This document introduces Scala in an informal way, through a sequence of examples.

官方文档:http://www.scala-lang.org/docu/files/ScalaByExample.pdf



blog comments powered by Disqus