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.

 

scala

 

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.

 

Banner


Gifts For Geeks 2024
22/11/2024

Are you ready for Thanksgiving, when overeating remorse and a surfeit of being thankful causes the unsettling thought that there are only four weeks till the Xmas break? So here is a mix of weird [ ... ]



Go At Highest Rank Ever in TIOBE Index
20/11/2024

Go is currently in 7th place in the TIOBE Index for November 2024. Not only is this is the highest position it has ever had, it's percentage rating is almost equal to its all-time-high. Will Go contin [ ... ]


More News

 

 

 

 

Last Updated ( Wednesday, 23 April 2014 )