Sunday, 28 September 2014

Scala :Setting Trend

Scala is a modern programming language that turned the attention of more programmers especially the java programmers. Scala is the acronym of scalable language. It can be listed under object oriented, functional as well as scripting language.
Its easy for the current java programmers to learn scala .Java libraries or existing application code written in java is completely reusable with scala. You can call scala from Java and you can call Java from scala, the integration is seamless.
Similarities between java and scala are many.Javac is the java compiler,While Scalac is the scala compiler .Both Java and Scala produces the Byte Code.Scala is also supported by most of the Java .IDEs like NetBeans,Eclipse,etc
When we code something with scala,we can expect to solve more errors during compile time rather than the deployment phase. Scala supports operator overloading which is not supported by Java.  LinkedIn,EDFT,Twitter,Novell,theGuardian,Xebia,Xerox,FourSquare,Sony,Siemens,Thatcham,GridGain,AppJet,Reaktor and many others  use scala in a wide phase and expected to dominate soon.

In Scala, Every value is an object and every operation is considered as a method call .It also provides backward compatibility with java where we can take advantage of using traditional design patterns . Also implicit calls add a beauty to the language ie it allows you to add new operations to the existing class .Recursive dependencies also supported here in scala .
We can define scala as the Java without semi colons  ie semi colon syntax error . Usually we use Value types initiating with small letters like int,double,Boolean but in scala the initial letters are capitalized like Int, Double, Boolean instead of int.Instead of Java's import foo.*;, Scala uses import foo._.

Scala has the following properties
1)Polymorphioc Methods
2) Generic Classses
3)Variance annotations
4)Upper and lower type bounds
5)Compound Types
6)Views

Hello World Program          
 object HelloWorld {
 def main(args:Array[String]){
println(“Hello World”)
}
Yes..! Scala is trend breaking . Most of the developers say,its gonna be the future of programming.Here ,a question arises in everyone’s mind.
Do scala Kill Java ?
Java 8, packed with productivity and trending features like  lambda expressions, methods, references, and functional interfaces is going to be available soon .  
And this question is interesting and even I have not started with scala. Lets wait and watch !
I will come up with a much more detailed article after having some hands-on coding with scala!!


No comments:

Post a Comment