scalac + a decompiler ought to do the trick, roughly. But you'd still end up with a bunch of big ugly Java constructs for things like functions, case classes, pattern matching, and the like. And while I'd love to see what would happen to that code if you ran it through gwtc, I'm guessing it would be rather suboptimal relative to what you'd get if you took the (scala -> (some better IR) -> js) path.
On Fri, Oct 2, 2009 at 11:04 AM, Ray Ryan <[email protected]> wrote: > I don't suppose there is an existing scala -> java source translator? > > On Oct 2, 2009 7:04 AM, "John Tamplin" <[email protected]> wrote: > > 2009/10/1 Maxime Lévesque <[email protected]> > >> Has there ever been discussions about supporting scala ? >> > > There have been some water cooler discussions about it, but it seemed like > there were too many tasks left to do to make Java-based GWT everything we > want it to be to undertake such a project. > > People have used Scala on the server with App Engine, if that is of > interest. > > > > I assume that significant part of your java->javascript translater > > could be resused, and th... > > That would help for Development Mode (previously called Hosted Mode), but > doesn't really matter for compiling. > > > > > What kind of effort would it take ? > > We already build our own Java AST from the JDT AST, so the primary things > would be: > > - wire up a Scala compiler > - maybe have to do something for Java interop since we wouldn't > necessarily have class files for dependencies at the time of compilation > - generate AST nodes from the Scala compiler > - update code generation passes to account for new AST nodes or new > uses of existing ones > - probably minor modifications to Development Mode to know how to > generate bytecode on demand for Scala > > -- > John A. Tamplin > Software Engineer (GWT), Google > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
