Sunday, February 12, 2012

Scala - The Programming Language


Object-oriented programming language treats every value as an object in a program. Scala allows developer to implement objects and classes just as Java. In Scala, semi-columns are always optional. This alternation of the semi- column made OO language cleaner and more concise. However, if statements are presented in a single line, semi-columns are required to separate them.


One interesting feature in Scala’s object-oriented paradigm is the trait, which I will cover briefly later.


As mentioned previously, Scala is not only object-oriented, but also functional. Being functional, it provides developers the option of both immutable and mutable data types. Scala leaves the decision to the developers to declare. Scala comes with a shell interpreter just like other functional languages like Haskell. An interpreter made testing small functions and quick evaluation easy. All the foundation of functional program is preserved in Scala, such as First- Class values. This means we can pass functions as an argument to other functions. Functions can be defined inside a function just like Haskell.


No comments:

Post a Comment