Are Builders used by users for custom plugins? Should we deprecate and keep the old methods around for a while to avoid breaking user code?
Remko Sent from my iPhone > On 15 Nov 2016, at 5:22, Matt Sicker <boa...@gmail.com> wrote: > > I like using set instead of with for builders. I've only been using with > methods lately for constructing modified copies of the current object which > doesn't exactly fit the builder idea (since the builder is modified and not > copied). I've also used builders without any prefix, but that would look > rather silly mixed with setters and withers at this point. > >> On 14 November 2016 at 13:55, Gary Gregory <garydgreg...@gmail.com> wrote: >> I recently added a bunch of Builders in various places and used "with" as >> the setter method prefix. >> >> We have a mix of "set" and "with" in our Builders ATM. >> >> I am thinking of going back and changing the builders I added since 2.7 from >> "with" to "set". >> >> I am liking "set" better because: >> - More standard than "with" >> - Therefore IDEs like Eclipse, by default will not generate warnings for >> setter methods when the param name is the same as the ivar (the param name >> is hidding a field) >> - Easier to remember to type "s" for "set" when using code completion >> - shorter than "set" >> >> I still like "with" ONLY in the case when a NEW object is generated, which >> is usually not (never?) the case in our Builders. >> >> Any thoughts? >> >> Gary >> >> -- >> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org >> Java Persistence with Hibernate, Second Edition >> JUnit in Action, Second Edition >> Spring Batch in Action >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory > > > > -- > Matt Sicker <boa...@gmail.com>