INTRODUCTION
Scala is a general purpose programming language which supports the features of both object oriented and functional programming approaches.It was created and developed by Martin Odersky.
It was officially released on January 20, 2004.
The name of scala is derived from word scalable which means it can grow with the demand of users.
Features of Scala
Object Oriented
Scala is a pure object-oriented language in the sense that every value is an object.
Functional
Scala is 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.
Scala runs on the JVM and can also execute Java Code
On compilation, Scala code is converted to Java Byte Code which is then executed by the Java Virtual Machine (JVM).
Functional
Scala is 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.
Scala runs on the JVM and can also execute Java Code
On compilation, Scala code is converted to Java Byte Code which is then executed by the Java Virtual Machine (JVM).
Type inference
It is not require to mention data type and function return type explicitly. Scala is smart enough to deduce the type of data. The return type of function is determined by the type of last expression present in the function.
Higher order function
Higher order function is a function which works with another function i.e it either takes a function as argument or returns a function.
It is not require to mention data type and function return type explicitly. Scala is smart enough to deduce the type of data. The return type of function is determined by the type of last expression present in the function.
Higher order function
Higher order function is a function which works with another function i.e it either takes a function as argument or returns a function.
Scala Program Example
object MyObject{ def main(args:Array[String]){ print("Welcome to Scala") } }
2 Comments
https://medium.com/geekculture/working-with-future-in-scala-c1f9462c9987
ReplyDeletehttp://www.openkb.info/2015/01/scala-on-spark-cheatsheet.html?m=1
ReplyDelete