Scala comes to .NET/Mono
Scala comes to .NET/Mono
Written by Andrew Johnson   
Tuesday, 26 July 2011

The Scala website, fount of all Scala information, has an interview and some details of a project to bring Scala to .NET and hence Mono. The project is sponsored by Microsoft which has interesting implications in itself.

UPDATE Scala's .NET support was dropped in December 2012

The key person involved in the project is Miguel Garcia, part of the Scala group at EPFL ( École Polytechnique Fédérale de Lausanne) which is of course where the language was invented.




The current state of the project is that you can actually write Scala programs that run under .NET. There are a few limitations in using .NET libraries but these should be fixed in the near future. You can also use Visual Studio to build Scala programs but at the moment the plugin doesn't support nice features such as autocomplete etc. A new plugin, expected later in the year, is promised to provide full code support but you can use JVM IDE tools and simply import the completed code later.

The Scala .NET compiler is claimed to be robust and proof of this is that fact that it can compile itself at over 100K lines of Scala. The current compiler is a port of a cross-compiler that runs on the JVM and made use of JDK dependencies which ruled out bootstrapping to .NET by self compiling. The  .NET compiler is written in Scala but it is compiled to byte code using the standard Scala compiler. The first step on the road to creating a compiler that would run under .NET was to use the existing IKVM compiler which takes JVM byte code and outputs .NET IL. 

Running the .NET compiler's byte code though IKVM didn't produce a compiler that runs under .NET, however, because of the JDK dependencies. The solution to this was to create an automatic mapping tool for the standard Scala compiler that would take out the dependencies and replace them by IKVM .NET equivalents. With this refinement it was possible to create an IL version of the .NET compiler that runs under .NET and compile itself - bootstrapping completed!

More Information

"how to use" guide

Scala  .Net

Scala NET interview


If you would like to be informed about new articles on I Programmer you can either follow us on Twitter or Facebook or you can subscribe to our weekly newsletter.



Udacity Launches Free Career Courses

To coincide with the time of the year that students all over the world graduate and start looking for jobs, Udacity, in collaboration with Grow With Google, has expanded its portfolio  with  [ ... ]

Hand Tracking With Nothing But A Webcam

There have been hand trackers and they didn't really make much of an impression, but a hand tracker that uses just a webcam could be the breakthrough. Webcams are everywhere and the software could add [ ... ]

More News





Last Updated ( Wednesday, 23 April 2014 )

RSS feed of news items only
I Programmer News
Copyright © 2018 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.