On 17 Oct 2019, at 13:26, Chris Angelico <rosuav@gmail.com> wrote:
On Thu, Oct 17, 2019 at 8:54 PM Inada Naoki <songofacandy@gmail.com> wrote:
I think this PEP is very relating to language design philosophy.
(a) Overload operator heavily for convenience.
(b) Prefer methods over operators. Set a high bar for overloading operators on core types.
I prefer (b) philosophy. And I don't think described usefulness is enough for adding the operator.
I know this is a subjective opinion, but I'm -1 on this PEP.
Equally subjective, of course, but I prefer to be able to use operators. There's a good reason that we use mathematical symbols for non-numeric data types already (adding tuples together, multiplying a list by an integer, etc), and it definitely makes code easier to read.
The multiply a list/string thing is a big mistake imo. You almost never use it so the cost of not having it is almost nothing while the cost of having type errors propagate beyond the point where they happened is big. Let's not remake the mistakes of the past. Or at least let's not use those mistakes as positive examples. / Anders