On Wed, Oct 8, 2014 at 3:15 PM, Thomas Broyer <[email protected]> wrote:
> On Wed, Oct 8, 2014 at 7:11 PM, Colin Alworth <[email protected]> wrote: > >> Not quite. Anything that continues to return user.client.Element can only >> be overridden to return user.client.Element or a subclass. >> > > Ha, didn't thought about subclassing w/ overriding. > Yeah, that was the main issue I remember being concerned about. Thankfully covariant return types make it more manageable: as long as user code limits itself to: 1. Only use com.google.gwt.user.client.Element as a return type when needed for overloading a GWT-provided method, and 2. In those methods, only writes return statements in the form "return DOM.asOld(...);" then they'll be forwards compatible with the future GWT release that changes the return types everywhere to com.google.gwt.dom.client.Element (but keeps the user.client.Element subclass). Then finally once everyone's moved to that GWT release, user code can change "user.client.Element -> dom.client.Element" and "return DOM.asOld(...) -> return ..." to be forward compatible with the *next* future GWT release that removes those APIs completely. (Unfortunately like Goktug mentioned, updating Google's internal code base to meet those first two constraints is a major endeavor.) -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAF52%2BS7uEwwKV-im7XbUxLkNnXkZFHcgWHjMyJH3EcCBA5GM%3DA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
