I'm toying with some language ideas. BitC-the-first failed for various
reasons, and I'm trying to work out how to get what I learned into a viable
production language. At the moment I have a very mundane question, and I'd
like input.

One of the implementation mistakes in BitC was the decision to use
C++/Boehm-GC as the implementation language. At the time, it seemed the
best of bad options. Mono wasn't far enough along at the time to be stable,
and LLVM's GC support wasn't soup yet, The only viable alternative seemed
to be Java. Java would have worked as an implementation language, but the
JVM lacks adequate support for unboxed types, and if I was going to eat the
learning curve for a whole new runtime, I really wanted to use it as a *
target* runtime as well.

Today I think that situation has changed.

CLR support on linux is now good enough, and with the exception of unboxed
arrays it has everything we need to have to serve as a target for a
BitC-like language. There are safe (that is: recognizably safe in the eyes
of CLR) structural encodings of all of the BitC data types, and the array
issue has workarounds. While I don't want CLR as a primary final target,
it's a fine target to have and provides a lot of useful stuff for
developing a new language.

The other option is to re-consider LLVM. There are now several examples of
GC'd languages that are successfully targeting LLVM, and the LLVM
infrastructure is pretty robust at this point. There are bindings for LLVM
from both C# and Java. For purposes of building the initial compiler, there
are LLVM bindings available from both Java and C#.

I gather that the DaVinci project was adding support for unboxed types to
the JVM. I don't understand the state of that, and the page is presently
inaccessible. But unless DaVinci provides real support for value types, I
don't think JVM is an option.

The *disadvantage* to CLR is that the mono and monodevelop projects have
been handed to Xamarin, who have made it clear that working on linux
problems isn't a priority. JVM, on the other hand, works pretty much
everywhere. If we think that LLVM is a better final target, it might be
better to implement in Java targeting LLVM from the get-go. I'm not sure.

What other language virtual machines am I failing to consider? What is the
current state of DaVinci? Does anybody have recent experience with GC in
LLVM?


Jonathan
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to