Ivan Krylov <[email protected]> wrote:
> FWIW, Perl5 has a separate string concatenation operator (".") in order
> to avoid potential confusion with addition. So do Lua (".."), SQL
> ("||", only some of the dialects) and Raku ("~", former Perl6).
Indeed, using the same operator '+' for addition and string concatenation is
not a great idea in my opinion.
Accidental character arguments to a '+' that meant to be a numerical addition
would go undetected. Bug tracking would be harder in that case.
R is already too permissive: it finds some interpretation of most probably
buggy code, such as ifelse() on vectors of unequal length or '[' operator with
only one argument to index a matrix. I would not want to add new permissive
behaviors.
A new operator, dedicated to string concatenation, such as %+% or %.%, would be
better, in my opinion.
--
Sincerely
Andr� GILLIBERT
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel