[Python-ideas] Descouraging the implicit string concatenation

Paul Moore p.f.moore at gmail.com
Wed Mar 14 09:54:33 EDT 2018


On 14 March 2018 at 13:40, Søren Pilgård <fiskomaten at gmail.com> wrote:
> We can't remove all potential pitfalls, but I do think there is value
> in evaluating whether something has bigger potential to cause harm
> than the benefits it brings, especially if there are other ways to do
> the same.

Certainly. However, in this case opinions differ (I, like Steven, have
no problem with implicit string concatenation, and in certain cases
prefer it over using explicit addition and relying on the compiler
optimising that away for me).

Also, we need to consider the significant body of code that would
break if this construct were prohibited. Even if we were to agree that
the harm caused by implicit concatenation outweighed the benefits,
that would *still* not justify making it illegal, unless the net gain
could be shown to justify the cost of forcing every project that
currently uses implicit concatenation to change their code, debug
those changes, make new releases, etc.

Paul.


More information about the Python-ideas mailing list