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


Deno Improves JSR Support
08/04/2024

Deno has been updated to improve JSR support, and to build on the Temporal API introduced in version 1.4.  Deno is the JavaScript and TypeScript runtime from the creator of Node.js.



Udacity's New Discovering Ethical AI Course
12/04/2024

Udacity has just launched an hour-long course on Ethical AI. Intended for a wide audience across many industries, it introduces to basic concepts and terms needed to step into the world of Ethica [ ... ]


More News

 

 

 

 

Last Updated ( Wednesday, 23 April 2014 )