commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: [CSV] Discussion about the new CSVFormatBuilder
Date Tue, 20 Nov 2012 23:41:15 GMT
Another way of looking at the builder style is that it is Java's way of
using keyword arguments for complex constructors.  It also allows a
reasonable amount of future-proofing.

These benefits are hard to replicate with constructors.  On the other hand,
builder-style patterns are a royal pain with serialization frameworks.

On Tue, Nov 20, 2012 at 2:57 PM, Gary Gregory <garydgregory@gmail.com>wrote:

> Ok this is good. Let's see some healthy debating. :)
>
> What is the alternate API?
>
> To me the bother is the extra build() call, but that's the pattern.
>
> Could an alt API be used and co-exist?
>
> Is making the ctor an option? It would have to do some validation.
>
> Gary
>
> On Nov 20, 2012, at 16:59, Emmanuel Bourg <ebourg@apache.org> wrote:
>
> > Le 20/11/2012 20:01, Benedikt Ritter a écrit :
> >
> >> Please share your thoughts about the builder.
> >
> > Sorry Benedikt but I have to say I really don't like this design. I
> > prefer a simpler API for the reasons you mentioned in the disadvantages.
> > The minor improvements from the developer's point of view are much less
> > important than the ease of use from user's point of view.
> >
> > Emmanuel Bourg
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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