Please reply in Rietveld so that people looking at it later can see the
full thread.

Yes, the goal is to have some widgets use this, not directly
though. In my naive design the code is loaded, but the objects
are created only if needed. Will it solve anything? Is there a
solution scheme that doesn't even load the modules unless needed?

How will the widgets know they need this functionality?  If you have a
field which is only null unless some call is made, the compiler can know
that it is always null and strip out the class that is only assigned
there, and all the null-protected calls.  If it the widgets figure out
if they need it, the compiler will not be able to tell and will always
have to include the classes and relevant code, and all the calling code
will remain as well (which will probably prevent inlinability).

An alternative would be to have a separate module get loaded when the
user wants to enable this functionality, and replace-with rules
substitute Bidi-aware classes for regular ones which this module is
inherited.

Of course, it may be that the code pulled in is small or the
functionality so important (such as if i18n apps are considered broken
without it) that we are ok with having it included in most apps by
default.

http://gwt-code-reviews.appspot.com/140809

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

Reply via email to