No I don't think so.  There might be some additional overhead of returning a
value instead of void, but I"m pretty sure that would be extremely
negligible to the point of never becoming an issue, regardless how hard you
try (the function invocation itself should dominate that by orders of
magnitude).

On Thu, Apr 16, 2009 at 2:03 PM, Eric Ayers <[email protected]> wrote:

> Recently I've been wrapping some of my JavaScriptObjects using the builder
> pattern where an instance of the object you are setting is in the return
> value.
>
>   http://galgwt-reviews.appspot.com/21604/diff/1/18?context=10
>
> Which you would invoke as:
>
>
>   DraggableObject obj = new DraggableObject(elem,
> DraggableObjectOptions.newInstance().setLeft(10).setTop(5));
>
> Can anyone think of a reason I might be shooting myself in the foot
> performance wise or code size wise as opposed to making these strict setter
> methods?  I don't want to set a bad example.
>
> -Eric.
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USA
> http://code.google.com/webtoolkit/
>
> >
>

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

Reply via email to