Most Read Latest News Blog Resources

Multi-paradigm Scala language seeks to out-Java Java




April 20, 2009 — 
It is fashionable, in the modern era, to run other languages on top of a Java virtual machine. But while JRuby and Jython push popular dynamic languages into the JVM, Scala takes another approach. Since the pattern-centric programming language first appeared in 2003, Scala has expanded to take advantage of the existing Java infrastructure that is in most enterprises. The Scala IDE plug-in for Eclipse was updated to version 2.7.4, a release candidate that brings the language even closer to the underlying Java ecosystem.

The Scala project describes Scala as “a general-purpose programming language designed to express common programming patterns in a concise, elegant and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application.”

Miles Sabin, managing director of Chuusai Ltd. (a UK-based consultancy specializing in Eclipse and Scala) and technical lead on the Scala IDE for Eclipse, said that French investment firm EDF ponied up the money to help bring the Scala IDE into the modern era.

“I became involved in the development of the Scala IDE for Eclipse about a year ago,” said Sabin. “At more or less the same time, I kicked off a UK-based Scala consultancy. A London-based group (EDF's energy group) was interested in using Scala internally. They'd used the Scala IDE for Eclipse, but at the time it wasn't stable enough, so they were looking for groups to sponsor work on the Scala IDE for Eclipse.”

Today, said Sabin, that IDE is now coming closer to its goal of completely seamless integration with the Java landscape.

“Many people are coming to Scala looking for a better Java. The main thing they need to see is absolutely seamless interoperability between Java code and Scala code,” he said.

“That's not just at runtime, it also means the entire toolchain. The vast majority of people choosing Scala are doing so because they're bumping up against the constraints of Java, but they have a huge amount invested in Java infrastructure. That is the main highlight feature of the Scala IDE for Eclipse.”

Another reason to come to Scala is for the scalability. Sabin said that Scala behaves more like Erlang than Java when it comes to multicore and multi-threaded applications.

“Scala has a concurrency model, which has some similarities with the Erlang concurrency model. It's a message-passing concurrency model based on the absence of any shared mutual state,” he said. Erlang is a programming language and runtime developed by telecommunications giant Ericsson.

The strong emphasis on concurrency could be the reason popular social messaging service, Twitter, incorporates Scala code.

“Scala is a noticeably higher-level language than Java,” added Sabin. “It offers a richer and more sophisticated means of composing code, which allow for typical problems to be expressed concisely.

"Scala, despite being a statically type-checked language, has an extremely advanced type inference mechanism. A large number of inferences don't have to be written in code. That's supported by the Scala IDE for Eclipse. It has very tight integration with the Scala compiler. It has access to all the semantic info associated with the Scala source text, which is being worked on by the developer. That allows the IDE to provide some very sophisticated feedback."

Version 2.7.4 of the Scala IDE for Eclipse is currently only a release candidate, but Sabin says that it’s worth trying out.

“Code completion works both ways," he said. "Every Java class is also a Scala class. There is a way of using Scala, which is really just as an improved Java. Almost every Java library is available directly from Scala. If you have a standard Java API that has APIs for registering listeners or callbacks, it's possible to directly pass a Scala entity to that API and have it treat that as a callback in a Java library.”


Related Search Term(s): JavaScala


Share this link: http://www.sdtimes.com/link/33426
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading



 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 3/15/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Google Code turns 5
Google Code Turns 5, and adds a Paxos Algorithm to make the system more stable and reliable.
03/17/2010 11:16 AM EST

Test your Visual Studio 2010 know-how
Microsoft is offering free beta certification exams for Visual Studio 2010.
03/17/2010 11:08 AM EST

Microsoft lifts the hood on IE9
Microsoft is previewing IE9.
03/16/2010 01:10 PM EST

 

Events calendar tab
3/22/2010 to 3/25/2010
Santa Clara, Calif.
The Eclipse Foundation

4/12/2010 to 4/14/2010
Las Vegas
Penton Media

4/12/2010 to 4/15/2010
Santa Clara, Calif.
O'Reilly Media

4/19/2010
New York City
Flagg Management

4/25/2010 to 4/28/2010
Overland Park, Kans.
IIUG