« Return to Thread: [scala] Scala as the long term replacement for java/javac?

Re: [scala] Scala as the long term replacement for java/javac?

by Ruslan Shevchenko :: Rate this Message:

Reply to Author | View in Thread

> On Tue, 7 Jul 2009 12:56:30 +0100
> Ricky Clarkson <ricky.clarkson@...> wrote:
>
>> That's all well and good, but as long as other JVM languages are not
>> written with Scala in mind, we don't want them to have to write
>> Foo$.MODULE$.bar(), which is ugly in the prettiest untyped languages.
>
> I think that is actually not so much of a problem (disclaimer: So far I
> haven't done much with Java<->Scala interoperation). Trying to call a
> different language's constructs is always somewhat awkward at best. I
> think if you write Scala code that's intended to be used by Java
> code -- e.g. a library you're writing in Scala -- then a reasonable
> course of action would be to provide proper bindings in that language.
> That way you can hide the strange module names in a more-or-less thin
> wrapper and at the same time provide a probably better-suited interface
> to your actual code.
>

 Require explicitly write Java interface API (on Java) for all exported
functions is not a very good idea, from productivity point of view: any
simple listing of all methods will increase amount of work and require
time for switching  between Java and Scala.




> Carl-Eric
>


 « Return to Thread: [scala] Scala as the long term replacement for java/javac?