commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [CSV] Should the Builder API be optional?
Date Tue, 26 Mar 2013 15:31:19 GMT
On Tue, Mar 26, 2013 at 11:18 AM, Emmanuel Bourg <ebourg@apache.org> wrote:

> Le 26/03/2013 15:05, Gary Gregory a écrit :
>
> > So I have two questions:
> >
> > Should the CSVFormat be made public? Would that make Emmanuel happy? I am
> > guessing not due to the 9 params.
> >
> > If the ctor is made public, should we add a bunch of ctors for simpler or
> > all cases?
>
> Well guessed. The whole point of the fluent API was to avoid the
> proliferation of constructors, or the use of a huge constructor with
> many parameters that are often impossible to remember properly.
>

Right, so here we are now with the fluent builder API. You've expressed
discontent. So now what can we do? How do you think the API can be made
better? Would you prefer to see many ctors on CVSFormat in addition to the
fluent API so you can choose one style over the other depending on
circumstance? Or would you never use the fluent API? I wonder if there is
room for both styles or if this is a case of 'you can't make all of the
people happy all of the time...'

For me a builder API is OK, but I am not a fan of the fluent API in Java,
in Smalltalk, sure that was great (I won't digress ;) But I can live with
it.

Gary

>
> Emmanuel Bourg
>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message