[Rd] string concatenation operator (revisited)

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sun Dec 5 13:22:12 CET 2021

On Sat, 4 Dec 2021 21:26:05 -0500
Avi Gross via R-devel <r-devel using r-project.org> wrote:

> In many languages, like PERL, this results in implicated conversion
> to make "text1" the result.

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). Some of
the potential concerns with string concatenation as an operator in R
could be alleviated by introducing a separate operator, just like matrix
multiplication ("%*%") is separate from elementwise multiplication
("*"), nowadays even in Python ("@" and "*", respectively).

Best regards,

More information about the R-devel mailing list