MLj status?

Anoq of the Sun
Wed, 30 May 2001 16:13:47 +0200 wrote:
> Anoq wrote:
> > So, I'm wondering if there is a new version of MLj on the way? :)
> Last time I spoke to the people at Microsoft Research, they claimed
> yes, definitely.  The next version should have full modules, and
> more features for integrating Java and ML code.

OK - I will look forward to it :)

> Claudio Russo
> joined them last year and is working on this, among other things
> (Claudio put full modules (and more) into Moscow ML).

Yes - I attended a talk he held about it at ITU here in Copenhagen :)

> This is happening in parallel with SML.NET, a similar compiler
> targeted at the .NET platform.  In principle, this has some
> advantages over the JVM: dot-net supports multiple languages from
> the start, and has a few relevant tweaks like tail-recursion and
> unboxed datastructures on the stack.  Of course, it isn't as widely
> portable (though the .NET specs are publicly available, if you fancy
> implementing it for your favourite OS).
> Cross-language coding is a particular focus at the moment; the idea
> being that tools like Visual Studio.NET will know enough about
> languages and their compilers to manage several at once, including
> ML.  From the compiler end, that means putting features in MLj and
> SML.NET that allow direct handling of foreign-language
> (non-functional) datastructures.

I also attended Erik Meijer's talk at ITU :)
But thanks for all the info anyway :)

> Of course, I have no idea of dates for these assorted possibilities.
> It happens when it happens.

OK - then I think I would have to go with Java for now - at least
on this project :)

> What are your thoughts on what would be good in MLj

Bug fixes! :) It has to generate code which doesn't crash
the browsers... and it would be nice if there were some
MLj code available to properly detect browser compatibilty
and allow for downloading browser / JVM upgrades and
things like that.

> whether SML on dot-net is interesting

Yes! But so is SML on JVMs :)

> what are important interlanguage features ?

In general, this is something I've thought a lot
about. And some of the things which would be good
in general (not just for .NET and JVM) would be things like:

*) Being able to create separate external libraries
     (.DLL, .so etc.)
*) Being able to control the compiler on API boundaries
   on a binary level (outside the source program! - because
   it really doesn't have anything to do with the API).

   An example: I would like to be able to tell the compiler
   that in the function "" in argument
   "baz : real Array.array", I want the "real Array.array"
   to be passed as a pointer to an array of float values of
   32 bytes each and a separate 32 bit integer argument with
   the length of the array. And on a MIPS processor I want the
   arguments to be passed in registers 5 and 6 etc.

   Details like these do not belong in the source progam -
   but if one has control over it in the compiler (maybe
   a separate API specification?), it can be used to define
   good ABIs without compromising the design or beauty of
   the APIs :) And a sufficiently clever compiler can
   take advantage of this information and convert the
   data to the desired representation at just the
   right time - where it gives least overhead.

I talked a little with the MLton guys about supporting
things like this in MLton.

This is all the suggestions I can think of right now...
And thanks a lot for your reply :)