True; I have no strong preference.  Sometimes we only need one side of the
boolean.

~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley


On Wed, Jan 4, 2023 at 1:26 PM Jason Gerlowski <[email protected]>
wrote:

> +1 to "with" over "set" where it makes sense.
>
> > Arguably, a pair of methods "sendUpdatesInParallel()" and
> "sendUpdatesSerially()" would read more naturally.
>
> It definitely "reads" more naturally.  Though it's worth pointing out the
> (potential) downside of this approach for boolean options: using two
> methods makes the mutual-exclusivity less explicit if the names aren't
> crystal-clear.  (Not that I'm against the twin-method approach.  It just
> has to be used very carefully IMO.)
>
> On Wed, Jan 4, 2023 at 12:42 AM David Smiley <[email protected]> wrote:
>
> > Right; it should aim to read naturally as if in English, that's the idea.
> > We can *prefer* the "with" prefix but some parameters might be expressed
> > more clearly in some other way, especially if boolean.  In
> > CloudHttp2SolrClient, I see one "sendDirectUpdatesToShardLeadersOnly()"
> > which I think is clear.  There is a "withParallelUpdates(boolean)" right
> > next to that.  Arguably, a pair of methods "sendUpdatesInParallel()" and
> > "sendUpdatesSerially()" would read more naturally.
> >
> > ~ David Smiley
> > Apache Lucene/Solr Search Developer
> > http://www.linkedin.com/in/davidwsmiley
> >
> >
> > On Tue, Jan 3, 2023 at 11:39 AM Houston Putman <[email protected]>
> wrote:
> >
> > > I vote for the "with" option. Seems to be the most common builder
> > pattern.
> > >
> > > - Houston
> > >
> > > On Thu, Dec 29, 2022 at 7:41 AM Eric Pugh <
> > [email protected]
> > > >
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I wanted to drop a note and ask if there were any standards/patterns
> > that
> > > > we use in Solr (or want to use!) for naming methods for builders?
> > > >
> > > > I put some notes on some of the flavours of names we use on
> > > > https://issues.apache.org/jira/browse/SOLR-16590 and would love some
> > > > feedback.
> > > >
> > > > Eric
> > > >
> > > > _______________________
> > > > Eric Pugh | Founder & CEO | OpenSource Connections, LLC |
> 434.466.1467
> > |
> > > > http://www.opensourceconnections.com <
> > > > http://www.opensourceconnections.com/> | My Free/Busy <
> > > > http://tinyurl.com/eric-cal>
> > > > Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <
> > > >
> > >
> >
> https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw
> > > >
> > > >
> > > > This e-mail and all contents, including attachments, is considered to
> > be
> > > > Company Confidential unless explicitly stated otherwise, regardless
> of
> > > > whether attachments are marked as such.
> > > >
> > > >
> > >
> >
>

Reply via email to