Scalac has an option to produce desugared java like output, (I say "java like", because it is "almost" compilable Java, but quite). It's a horror scene from a readability standpoint, you get to see all the tricks Scalac uses to support closures, implicit conversions, comprehensions and what not on the java VM. Looking at stack traces produced by Scala programs gives you another hint or two. My take is that it is beyond suboptimal, in the sense that the complexity of making it work might be not much less than doing the ScalaAst -> GwtAst translation, but I could be wrong.
In terms of interest in a Scala GWT, it's a chicken and egg thing, my opinion is that once people get to see the expressivity of Scala applied to GWT, the interest should grow. One particular pattern that would illustrate this would be a builder similar to : http://groovy.codehaus.org/Swing+Builder. I like what I see in this example, with GWT-Scala you would get the same level of expressivity, with the added benefit of strong typing (for me that is a big one) and a superior UI framework (...yes I am a fan of GWT...). Scalac exposes it's API via plugin, it could save the most boring work for a ScalaAst -> GwtAst translator : http://www.nabble.com/Creating-AST-trees-in-compiler-plugins-td22995976.html I'm no compiler Guru, nor a GWT one, but it would seem that if the Gwt AST was enriched to support at least closures, (might be usefull one day : http://www.javac.info/ ...one week after never... but that is another topik...;)) possibly some other constructs that translate easily from Scala to JS (if there are other) the translator would be easier to write. ... at least in theory ! Max On Fri, Oct 2, 2009 at 12:12 PM, John Tamplin <j...@google.com> wrote: > On Fri, Oct 2, 2009 at 11:52 AM, Joel Webber <j...@google.com> wrote: > >> I think any interested party ought to be able to try the decompiler route >> and see what happens. God knows how weird it might look, but I see no >> obvious reason that it shouldn't work. Takers? > > > Are there any free decompilers that do fully correct bytecode->source > translation? When I last looked, there were a lot of old (apparently) > unsupported ones, and a few that mostly worked. They were plenty good > enough to figure out what the original code was trying to do, but not > suitable for modifying the code and compiling it to functional code. > > -- > John A. Tamplin > Software Engineer (GWT), Google > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---