glinraen / scala-lightening-talk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Intro to Scala

Object-oriented meets functional


  • Scala, short for Scalable Language, is a hybrid functional programming language.

  • It was created in 2001 by Martin Odersky and released publicly in 2004.

  • It smoothly integrates the features of object-oriented and functional languages.

  • Scala is compiled into Java Byte Code, which is executed by the Java Virtual Machine.

Why Scala?

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.

It's also a functional language in the sense that every function is a value and every value is an object, so ultimately every function is an object.

Because of its type inference and other features, Scala is a very succinct language, which allows developers to reduce the size of source code by at least a factor of two or three, compared to languages like Java.

It's also is bundled with a rich set of developer tools, comparing to languages like Ruby or Python.

Scalability - it has a wide range of both high-quality frameworks and libraries for incorporation into apps.

Scala is equipped with an expressive type system that detects and avoids many kinds of application errors at compile time.

More Facts About Scala

  • The type system of Scala is Turing complete.

  • Designed to be concise, many of Scala's design decisions were inspired by criticism of the shortcomings of Java.

  • Scala also can compile to JavaScript, making it possible to write Scala programs that can run in web browsers.

Companies who use Scala

  • Apple (jobpostings)
  • Coursera
  • Foursquare
  • Firebase
  • Git
  • Meetup
  • Novell
  • Quora
  • SAP
  • Twitter
  • VMware
  • Yammer

Sample Code

object HelloWorld {
   def main(args: Array[String]) {
      println("Hello, world!")
   }
}

Sample Scala in the Web Browser

Scala jsfiddle

Scala Kata

Links and Resourses

Scala

Scala Cheat Sheet

[Compare to JS] (http://vschart.com/compare/scala/vs/javascript)

[Coursera Class] (https://www.coursera.org/learn/progfun1)

[Kojo] (http://www.kogics.net/sf:kojo)

[Scala community] (http://www.scala-lang.org/community/)

About