Thursday, June 2, 2016

Re: gwt-inerop-utils preview


I will add 4 and 5 arg interfaces.

I can already smell the code smell..

void myAsyncFunction(Func5<String, Boolean, Random, MyClass, Something> onSuccess, Func5<Something, MyClass, Random, Boolean, String> onFailure);

IMHO its fine to just have Func1 and for anything else chose a concrete name for a concrete functional interface so you have a place to document all these parameters. The above should be myAsyncFunction(OnSuccessCallback ..., OnFailureCallback ...) with some nice JavaDoc in OnSuccessCallback, OnFailureCallback.

So think twice if its really a good idea to add any kind of possibly "useful" interfaces.

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment