Andrew Stopford's Weblog

poobah

Sponsors

News

Articles

Family

Old Blogs

Laszlo and .NET pt2

Time to dig into some details, comments welcome. This is from a recent post on the laszlo dev mailing list, I have added some annotations.

The question was how can a Java code base be used for the JVM/CLR. One suggestion was IKVM, while this project rocks I don't think it would be a good match in thise case, heres' why.

Maintaining combined Java/.NET code bases can get tricky. I have seen in the past that the code base core be written in Java and then compiled to IL using J# for the CLR or to Java bytecode for the JVM. This approach while costing some Java features means that your not bridging the code nor layering the code. A code layer would be a feature such as the IKVM which is a Java VM that sits ontop of the CLR. If the code can be compiled to IL or Java bytecode then you are taking advantage of all the benefits of each runtime. The features that you lose in such a code base you can then add to depending on the runtime you target.
 
That is when the core is compiled you can then add features that is unique to the runtime. For example these features could be built in C# for the CLR (or any other IL targeting compiler such as VB.NET or if python is the preferred choice IronPython) and allow features unique to the CLR. Or if Java is the target then these features could be built in Java and take advantage of the JVM. While the core would be one code base you will still have two code bases for each runtime, but it will mean that features unique to the runtime will be allowed.

I wanted to make clear the point that follows. Developers using the CLR will want features of the CLR, they will want remoting and the ability to reuse assemblies and legacy .NET code without any drop in features. The same goes for Java and the JVM etc.

Its very important that the full power of each runtime be used for each code base, when a coder is targeting the CLR or JVM then they expect to be using the full power of those runtimes.

A recent post mentioned that the the compiler was written in Jython but being rebuilt in Java, the fact Python is being used could help, my reasons....

On the python note, I know it was mentioned that the compiler is being rebuilt in Java from Jython (Python on the JVM) but if the language was to stay at Python then IronPython could be used to retarget to the CLR and one code base remains.....just a thought.

Its great that some thinking about running on two runtimes is going on, details do remain and the more folks chime in with their thoughts the better.
Posted: Oct 13 2004, 10:37 PM by astopford | with 1 comment(s)
Filed under:

Comments

TrackBack said:

dr dreff - andrew-stopfords-weblog
# October 14, 2004 12:12 PM