menu

Scala

Scala

posted in Blog categories: Big Data by nisha

Scala - Scalable Language

Scala is an acronym for “Scalable Language”. The language’s scalability is the result of a careful integration of object-oriented and functional language concepts.

Features -

Object-Oriented - Scala is a pure-bred object-oriented language. The language supports advanced component architectures through classes and traits. It also supports traditional design patterns for instance, singletons are supported through object definitions and visitors are supported through pattern matching. Scala also allows to add new operations to existing classes.

Functional - Scala is a full-blown functional language. For instance, first-class functions, a library with efficient immutable data structures, and a general preference of immutability over mutation. Scala allows a gradual, easy migration to a more functional style.

Seamless Java Interop - Scala runs on the JVM. Java and Scala classes can be freely mixed, no matter whether they reside in different projects or in the same. They can even mutually refer to each other, the Scala compiler contains a subset of a Java compiler to make sense of such recursive dependencies. Java libraries, frameworks and tools are all available. Build tools like ant or maven, IDEs like Eclipse, IntelliJ, or Netbeans, frameworks like Spring or Hibernate all work seamlessly with Scala. Scala runs on all common JVMs and also on Android. Popular Scala frameworks, including Akka, Finagle, and the Play web framework include dual APIs for Java and Scala.

Functions are Objects - Scala’s approach is to develop a small set of core constructs that can be combined in flexible ways. This applies also to its object-oriented and functional natures.

Some examples:

  • Functions in Scala are objects.
  • The function type is just a regular class.
  • The algebraic data types found in languages such as Haskell, F# or ML are modelled in Scala as class hierarchies.
  • Pattern matching is possible over arbitrary classes.

Future-Proof - Scala is a scalable server software that makes use of concurrent and synchronous processing, parallel utilization of multiple cores, and distributed processing in the cloud.

Applications

Scala facilitates concurrent programming. For instance, powerful frameworks like Akka in Scala lets you combine the goodness of actors with STM.

Scala also offers a very powerful parser combinator library that helps you design external DSLs through construction of monadic parsers that can be combined very elegantly using the combinators.

Scala has a very expressive syntax and offering powerful constructs for making abstractions easy. Hence you can design powerful internal DSLs using Scala.

Scala has a built-in type inference mechanism which allows the programmer to omit certain type annotations.

 

Big DataData

27 Jun, 16

 

 

related posts

 

 

latest comments

There are 0 comments on "Scala"

 

 

 

post a comment