Scala is for Scalable Language. A language which allows you to scale up or down your software development. Scalability is influenced by many factors, ranging from syntax details to
component abstraction constructs. Scala fuses Object Oriented and Functional paradigms together. In Scala we have Function is-a Value is-a Objects. So Functions are values and values are objects.
Scala is object-oriented: In Scala everything is an object. Unlike Java which has non object oriented impurities in terms of static values and methods as well as primitive types which are not objects, Scala creates constructs which satisfy the use cases of static values and methods with companion objects. In Scala there are no primitive types and everything is an object.
Scala is an object-oriented language in pure form: every
value is an object and every operation is a method call. For example, when
you say 1 + 2 in Scala, you are actually invoking a method named + defined
in class Int. You can define methods with operator-like names that clients
of your API can then use in operator notation.
Scala is Functional : A functional language has a Function is a value which is of same status as say integer. You can pass functions as arguments to other functions, store them in variables and return them as results of other functions. The second main idea of functional programming is that the operations of a program should map input values to output values rather than change data in place. So one should in a position to substitute a function call with its result without affecting semantics.
Other advantages of Scala is that its compatible with Java, Its concise and its Statically typed.
In the next post I plan to dig into the basics of langauge taking a step at a time.
No comments:
Post a Comment