On Mon, Oct 5, 2009 at 12:23 PM, John Tamplin <j...@google.com> wrote:
> Why would that be easier than just parsing Scala and building an extended
> GWT AST from the Scala AST?  It seems like inventing a new language (even if
> it is close to Java) and modifying tools on both sides to use this would be
> more work.

Parsing isn't enough.  It would also be necessary to type check, so
that the meaning of the ASTs can be understand.  After that, it would
be necessary to desugar the Scala ASTs down into Java equivalents.
That adds up to the bulk of a Scala compiler.  Especially the type
checking part would take a lot of time to reimplement.

The next best thing would be to call into the existing Scala compiler.
 However, doing it that way means that we have to figure out a way to
supply people with compatible versions of the GWT compiler and Scala
compiler.  If we don't come up with a stable API between the two code
bases, then we'll have to figure out a way to supply users binaries of
each language that work well together.  We can do that, but it will
mean people have an extra constraint when they choose which version of
GWT and which version of Scala they want to use.  Coming up with an
API looks better.

The text format would essentially be such an API.  It is unlikely to
change much over time, because both code bases are tracking Java's
glacial motion.  Further, it shouldn't be too time consuming to
develop, because it's only use would be to make two known code bases
be able to talk to each other.

Lex

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to