[Mulgara-dev] [Mulgara-general] Language discussion

Paul Gearon gearon at ieee.org
Thu Aug 20 15:44:18 UTC 2009


On Thu, Aug 20, 2009 at 10:00 AM, Andrew Woods<awoods at fedora-commons.org> wrote:
> Hello Paul,
> It is an intriguing move bringing another language into the baseline. I have
> played around a bit with some of your candidates, but unfortunately do not
> have substantive feedback in regards to your questions.
> However, I am interested to know how you envision the integration to play
> out. I assume the ANT build can manage piecing the build artifacts together.
> Do each of the candidates have well supported test frameworks? If you decide
> to migrate to Maven, is there plugin support? What sort of guidelines would
> dictate the structure of the baseline and/or which features are implemented
> in which language?
> I image these things have all been worked out in other projects. My
> experience with multi-language baselines is limited, so I was just curious
> about your basic take on the general integration issues.

The big advantage to these languages is that they simply compile to
.class files, and at that point you can usually forget about the
implementing language. Note that I say "usually" as there can be
differences, but in the case of Scala you can ignore this. The only
exception is that Scala introduces a new library to supplement the
default Java libs, but these are just Jars to add to the classpath.

For coding structure, I'd like to see call hierarchies not swap
arbitrarily between the two languages, if it can be helped. So once
you've called from Java into Scala, then I'd like to discourage
calling into any *new* code that is written in Java. Of course, we
will want to continue using the low level code and utility code that
is already written in Java (like MappedBlockFile, for instance), but
if, for instance, Scala code needs to make use of a new structure,
then that structure should be written in Scala, and not in Java. That
said, I've tried jumping between the two languages in my own systems
here, and there appears to be no issues. Both languages appear to be
completely unaware of what language any given class is written in....
which is part of what makes this process so appealing to me.

The only build issues that I'm aware of are running the appropriate
compiler to create the class files. In the case of Scala, this is
again easy, as plugins are available for both Maven and Ant:
  http://scala-tools.org/mvnsites/maven-scala-plugin/
  http://www.scala-lang.org/node/98

I believe that this sort of thing is available for each of the
languages I mentioned, though I haven't gone through that in detail
for each of them.

Unit testing is a good point that I didn't cover, though each language
has appropriate frameworks. In the case of Scala I haven't done a lot
with either Specs or ScalaTest, but they both look good:
  http://code.google.com/p/specs/
  http://www.artima.com/scalatest/

Integration testing shouldn't change, since it tests that the behavior
of the system is as described, and one of the goals here is to prevent
the external appearance from changing at all. The only difference here
is that we could start writing the test code in a language that is
easier to use.

Regards,
Paul



More information about the Mulgara-dev mailing list