Hm, I've never been fond of "with" names, it feels rather odd to me. If the
receiver is a builder then it's (usually) mutable, so I know that setters
return "this". If the class is not a builder, the I check the Javadoc.

Gary

On Sun, Jan 8, 2023, 16:49 Matt Sicker <m...@musigma.org> wrote:

> In my experience, I’ve usually used withFoo() methods for making immutable
> copies of things while I’ve used setFoo() methods for builder classes as
> those are mutable. In Log4j, we have a mix of these two patterns. I’d like
> us to be more consistent with this.
>
> Which style should we use in Log4j?
> —
> Matt Sicker
>
>

Reply via email to