Re: [gwt-contrib] Re: Changes setters/clearers com.google.gwt.dom.client.Style to return Style instead of void (issue1530803)
I cancelled the review. I didn't realize this would cause fat slow apps. Sorry about that. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Changes setters/clearers com.google.gwt.dom.client.Style to return Style instead of void (issue1530803)
No good. This defeats compiler optimizations big time. We don't like void returns either, but we like big fat slow apps even less. On Aug 22, 2011 7:50 PM, larse...@gmail.com wrote: Reviewers: jlabanca, rjrjr, Description: Changes Style to return itself instead of returning void. issue 6717 http://code.google.com/p/google-web-toolkit/issues/detail?id=6717 Please review this at http://gwt-code-reviews.appspot.com/1530803/ Affected files: user/src/com/google/gwt/dom/client/Style.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Changes setters/clearers com.google.gwt.dom.client.Style to return Style instead of void (issue1530803)
Just out of curiosity, does this have to defeat the compiler optimisations? Isn't it known at compile time that those setters will always return the same Style instance? In that sense, from the compiler's point of view, isn't the situation with the setter returning the Style the same as the situation with getStyle() returning the Style? On 23 August 2011 14:00, Ray Ryan rj...@google.com wrote: No good. This defeats compiler optimizations big time. We don't like void returns either, but we like big fat slow apps even less. On Aug 22, 2011 7:50 PM, larse...@gmail.com wrote: Reviewers: jlabanca, rjrjr, Description: Changes Style to return itself instead of returning void. issue 6717 http://code.google.com/p/google-web-toolkit/issues/detail?id=6717 Please review this at http://gwt-code-reviews.appspot.com/1530803/ Affected files: user/src/com/google/gwt/dom/client/Style.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Changes setters/clearers com.google.gwt.dom.client.Style to return Style instead of void (issue1530803)
On Tue, Aug 23, 2011 at 12:17 AM, Daniel Bell daniel.r.b...@gmail.comwrote: Just out of curiosity, does this have to defeat the compiler optimisations? Isn't it known at compile time that those setters will always return the same Style instance? In that sense, from the compiler's point of view, isn't the situation with the setter returning the Style the same as the situation with getStyle() returning the Style? No -- it may be theoretically possible to analyze that all the methods called don't mutate the object, the current compiler doesn't do it. We have talked about producing better code for the builder pattern, but it is surprisingly difficult to get right in all situations. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors