I'm a native speaker.

`starts_with?` reads as `adjective` followed by a `preposition`.
`split_with` reads as `verb` followed by a `preposition`.

So, this wouldn't be confusing to me.

As far as `_with` vs `_by`, I think `_by` has a slight leaning to element
wise operations, whereas `_with` has a slight leaning towards operations
that work on multiple elements, such as specifying the sorting function
which would compare two elements together. However, there are many cases
where they could be interchangeable.

Allen Madsen
http://www.allenmadsen.com


On Mon, Dec 31, 2018 at 9:44 AM José Valim <[email protected]>
wrote:

> > My main point here is tthat "_with" in the String and List modules is
> used to compare terms directly, and functions with the "_by" suffix accept
> a function and process info based on that.
>
> I don't think we can consider the suffixes in isolation. That would be an
> unnatural way to organize the API. How "_with" is used in start_with? is a
> different meaning than split_with which is marked by the preceding verbs.
> So unless the preceding word is also in the same category, like
> max/min/uniq which are aggregations, I believe we are comparing apples and
> oranges.
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Director of R&D
>
>
> On Mon, Dec 31, 2018 at 1:52 PM eksperimental <[email protected]>
> wrote:
>
>> On Mon, 31 Dec 2018 13:19:51 +0100
>> José Valim <[email protected]> wrote:
>> > From your group of functions, I would argue that only chunk_by is
>> similar
>> > to similar split_with, as the other functions are about computing a
>> > property from the data. So they may use the same suffix but the suffix
>> may
>> > not necessarily mean the same thing.
>>
>> Thank you José for taking the time to answer.
>> My main point here is tthat "_with" in the String and List
>> modules is used to compare terms directly, and functions with the "_by"
>> suffix accept a function
>> and process info based on that.
>>
>> The connotation that "_with" has on me is that an argument contains this
>> term;
>> while "_by" implies to do something like split, sort, group based on this
>> condition/rule which
>> happens to always be a function, not a term to compare to.
>>
>> I would also love to hear the opinion of native speakers.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elixir-lang-core/20181231195201.1b3d1c08.eksperimental%40autistici.org
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BiA1nJooFZDUhN8xhjGWeedo2-jNEQu4z%2Bfa6YCMS-sg%40mail.gmail.com
> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BiA1nJooFZDUhN8xhjGWeedo2-jNEQu4z%2Bfa6YCMS-sg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAK-y3CtVRCzQuEHSJ8TB%2BCivvy2SbZduaBTcfkf_iUDFJu7Scg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to