Stanford CS 94SI - A Tour of the Scala Programming Language

Unformatted text preview:

A Tour of theScala Programming LanguageJulien WetterwaldCS94SIThe Scala Programming Language●stands for “scalable language”●multi-paradigm language●runs on the standard Java and .NET platforms●interoperates seamlessly with all Java librariesScalableScalability of the systems and the methods for constructing them:●build interesting structures from simple parts●reuse and adapt existing componentsMulti-paradigm●integrates features of functional and object-oriented languages●the two programming styles are complementaryScala is functional●every function is a value●lightweight syntax for defining anonymous functions●higher-order functions●sequence comprehensions●pattern matchingScala is object-oriented●every value is an object●types and behavior of objects are described by classes and traits●class abstractions are extended by subclassing and mixin compositionScala is also...●statically typed●extensible●concise (factor of 10 compared to Java)–higher-level than Java–local type inference (no redundant type annotations)Javaboolean nameHasUpperCase = false;for (int i = 0; i < name.length(); ++i) { if (Character.isUpperCase(name.charAt(i))) { nameHasUpperCase = true; break; }}Scalaval nameHasUpperCase = name.exists(_.isUpperCase)Who is responsible for Scala?●the LAMP group at EPFL, Switzerland●led by Prof. Martin Odersky–wrote javac 1.1-1.4 and designed the good parts of Java Generics–ACM Fellow●a quickly growing community of contributors, users and bloggersResources●the Scala web site http://www.scala-lang.org●the Scala mailing list http://listes.epfl.ch/doc_en.cgi?liste=scala-user●... more resources on the course web site


View Full Document

Stanford CS 94SI - A Tour of the Scala Programming Language

Documents in this Course
Load more
Download A Tour of the Scala Programming Language
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view A Tour of the Scala Programming Language and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view A Tour of the Scala Programming Language 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?