Skip to content
Prev 60340 / 63424 Next

string concatenation operator (revisited)

On 05/12/2021 7:22 a.m., Ivan Krylov wrote:
People seem to handle the automatic conversion of comparison operators. 
  Occasionally someone is surprised that

   123 < "5"

is TRUE, but mostly people muddle along.

One possible issue is that for some things (e.g. S3 Arith group 
generic), "+" is grouped with the other arithmetic operators, "-", "*", 
"^", "%%", "%/%", "/".  I don't think it would make sense for any of 
them to work on strings.  But there are exceptions listed for number of 
arguments among the Math group, so an exception in the Arith group 
wouldn't be the end of the world.

Duncan Murdoch