On Mon, Oct 24, 2016 at 8:52 PM, Robert Bradshaw <[email protected]> wrote: > On Mon, Oct 24, 2016 at 10:12 AM, Kenneth Knowles > <[email protected]> wrote: >> The precedent that we use verbs has many exceptions. We have >> ApproximateQuantiles, Values, Keys, WithTimestamps, and I would even >> include Sum (at least when I read it). > > True. > >> Historical note: the predilection towards verbs is from the Google Style >> Guide for Java method names >> <https://google.github.io/styleguide/javaguide.html#s5.2.3-method-names>, >> which states "Method names are typically verbs or verb phrases". But even >> in Google code there are lots of exceptions when it makes sense, like Guava's >> Iterables.any(), Iterables.all(), Iterables.toArray(), the entire >> Predicates module, etc. Just an aside; Beam isn't Google code. I suggest we >> use our judgment rather than a policy. > > Yes, we should favor what flows well. Verbs often do, but...
On this note, however, the first attempt at trigger builders were developed to be "fluent" and read like English sentences, but in retrospect were needlessly verbose. >> I think "Distinct" is one of those exceptions. It is a standard widespread >> name and also reads better as an adjective. I prefer it, but also don't >> care strongly enough to change it or to change it back :-) >> >> If we must have a verb, I like it as-is more than MakeDistinct and >> AvoidDuplicate. > > I much prefer "Distinct" to the other options forcing it to be > verb-like (despite being the one to bring this up). My (weak) > preference is to leave RemoveDuplicates with better documentation, but > Distinct could be fine. >
