Search this site:

Scala Main Menu

About Scala

Introduction

In the Enterprise

Scala Community

Mailing Lists

scala

scala-announce

scala-user

scala-debate

scala-tools

scala-internals

scala-xml

IRC Channel

Blogs & News

Sygneca
Wiki

Scala Trac

Language Research

Papers

Talks

Theses

Courses

Presentations

In
the Press

Articles

Interviews and Panel
Talks

News Archive

The
Scala Team

Scala's
Prehistory

Contact Us

Documentation

Learning Scala

Tour of Scala

Manuals

A
Brief Scala Tutorial

Scala
by Example

Scala
Overview

Scala
Language Specification

The SID
Library

Translations

Books

Scala API

scaladoc

vscaladoc

Download
locally

Setup & Getting Started

Getting Started with
Scala

Java to Scala

Windows Mini-Guide

Setting PATH on Windows

fsc and the OSX
firewall

Programming
Guides

Scala Actors

Scala
on Android

Scala
on Microsoft .NET

Scala on Google App
Engine

Other Guides

Maven for Beginners

Scala
and JUnit on Eclipse

Scala, Emacs and
Yasnippet

FAQs

Code
Examples

Hello world!

Simple
Snippets

Advanced Examples

Software

Download Scala

Latest Stable Release

Previous Releases

Nightly Builds

Live
SVN Repository

Distribution
Content

Sbaz

IDE
and Editor plugins

IDE Plugins

Tool
Support

Libraries and Tools

Libraries

Development
Tools

Program
Testing

Other
Scala-Related

Scala License

Scala Developers

Developer's Guides

Build Scala from the
Source

Scala
IDE for Eclipse

Writing Compiler
Plugins

Scala
Ant Tasks

Compiler Internals

Improvement
Documents

Bug
Tracking & Testing

Scala Trac

Scala Hudson

Benchmarks

Review Board

Codebase Progress

Version History

Language Changes

Download Stats

Maintainers

Contributor
Agreement

Home » A Tour of
Scala

A Tour of Scala

Created by admin on 2008-07-05. Updated:
2008-08-20, 08:37

Scala is a modern multi-paradigm programming language designed to express
common programming patterns in a concise, elegant, and type-safe way. It
smoothly integrates features of object-oriented and functional languages.

Scala is object-oriented

Scala is a pure object-oriented language in the
sense that every value is an
object. Types and behavior of objects are described by classes and traits. Classes are extended
by subclassing and a
flexible mixin-based
composition mechanism as a clean replacement for multiple
inheritance.

Scala is functional

Scala is also a functional language in the sense
that every function is a
value. Scala provides a lightweight syntax for
defining anonymous functions, it supports higher-order functions, it allows
functions to be nested,
and supports currying.
Scala's case
classes and its built-in support for pattern matching model
algebraic types used in many functional programming languages.

Furthermore, Scala's notion of pattern matching
naturally extends to the processing of XML data with
the help of right-ignoring
sequence patterns. In this context, sequence comprehensions are
useful for formulating queries. These features make Scala ideal for developing
applications like web
services.

Scala is statically typed

Scala is equipped with an expressive type system
that enforces statically that abstractions are used in a safe and coherent
manner. In particular, the type system supports:

generic classes,

variance annotations,

upper and lower type bounds,

inner classes and abstract types as object
members,

compound types,

explicitly typed self
references,

views, and

polymorphic methods.

A local type
inference mechanism takes care that the user is not required to
annotate the program with redundant type information. In combination, these
features provide a powerful basis for the safe reuse of programming abstractions
and for the type-safe extension of software.

Scala is extensible

In practice, the development of domain-specific
applications often requires domain-specific language extensions. Scala provides
a unique combination of language mechanisms that make it easy to smoothly add
new language constructs in form of libraries:

any method may be used as an infix or postfix operator,
and

closures are constructed
automatically depending on the expected type (target typing).

A joint use of both features facilitates the
definition of new statements without extending the syntax and without
using macro-like meta-programming facilities.

Scala interoperates with Java and .NET

Scala is designed to interoperate well with the
popular Java 2 Runtime Environment (JRE). In
particular, the interaction with the mainstream object-oriented Java programming
language is as smooth as possible. Scala has the same compilation model
(separate compilation, dynamic class loading) like Java and allows access to
thousands of existing high-quality libraries. Support for the .NET
Framework (CLR) is also available.

Please continue to the next page to read more.

A Tour of
Scala: Abstract Types

A Tour of Scala:
Annotations

A Tour of Scala:
Classes

A Tour of Scala:
Case Classes

A Tour of Scala:
Predefined function classOf

A Tour of Scala:
Compound Types

A Tour of Scala:
Sequence Comprehensions

A Tour of Scala:
Extractor Objects

A Tour of Scala:
Generic Classes

A Tour of Scala:
Implicit Parameters

A Tour of Scala:
Inner Classes

A Tour of Scala:
Mixin Class Composition

A Tour of Scala:
Nested Functions

A Tour of Scala:
Anonymous Function Syntax

A Tour of Scala:
Currying

A Tour of Scala:
Automatic Type-Dependent Closure Construction

A Tour of Scala:
Operators

A Tour of Scala:
Higher-Order Functions

A Tour of Scala:
Packages

A Tour of Scala:
Pattern Matching

A Tour of Scala:
Polymorphic Methods

A Tour of Scala:
Regular Expression Patterns

A Tour of Scala:
Sealed Classes

A Tour of Scala:
Traits

A Tour of Scala:
Upper Type Bounds

A Tour of Scala:
Lower Type Bounds

A Tour of Scala:
Explicitly Typed Self References

A Tour of Scala:
Subclassing

A Tour of Scala:
Local Type Inference

A Tour of Scala:
Unified Types

A Tour of Scala:
Variances

A Tour of Scala:
Views

A Tour of
Scala: XML Processing

A Tour of Scala: Abstract Types ›

Printer-friendly version

Scala Quick Links

Download Scala

Reference
Manuals

Scala
API

Report a Bug

Submit a Story

Papers and Talks

News Archive

FAQs

Site map

Contact Us

Featured News

Scala 2.7.6 final

Lift Version 1.0 Released

User login

Username: *

Password: *
will be sent
securely

Create new account

Retrieve lost
password

Poll

I learn/use Scala because:

of a political
decision

of a technical
decision

of a customer
request

it makes my
life easier

it is great
fun

it is the
future

Malbolge was
too easy

Copyright © 2009 École Polytechnique Fédérale de
Lausanne (EPFL), Lausanne, Switzerland