On Tue, Aug 11, 2009 at 6:29 PM, Lex Spoon <sp...@google.com> wrote:

> Both of them already have reviews for me (or soon will).  It's not
> really a code splitter change, but new code to associate names with
> AST nodes (in ReplaceRunAsync).  CodeSplitter then looks up the names
> as recorded.  I was really wondering what you'd think is good style
> for this sort of thing.
>

Okay, I'll go back and take another look.


> > The fundamental question I have is why this is a class name instead of a
> > string literal?  If it's literally just an arbitrary string identifier,
> > it seems misleading to attach a class to it.
> >
> > http://gwt-code-reviews.appspot.com/56814
> >
>
> I should have dug up the thread that discussed the design of this
> naming scheme.  Here it is:
>
>
> http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/99751ee4ccd02d06/2ecbc72988b91a5b
>
>
> It was a long discussion, and this is the scheme that came out of it.
> I initially pushed for strings, myself, because they are simple and
> they are enough for applications.  Looking forward, though, libraries
> might include runAsync calls, in which case class literals have some
> advantages:
>
> 1. They reuse the global Java package hierarchy, so it's hard for two
> libraries to use the same name by accident.
>
> 2. Despite being in a global hierarchy--and thus long--you can use
> Java imports to shorten them back up.
>
> 3. They can have Javadoc attached.
>
> 4. They can have other annotations attached, if we ever come up with a
> need to attach more information to a split point.
>

That makes perfect sense, I could imagine using annotations to give the
compiler hints about how to split your code.  Not that I would want to
second-guess that design discussion anyway.  I mainly just wanted to know
what the reasons were.

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

Reply via email to