[R] R as a programming language
tlumley at u.washington.edu
Thu Nov 8 17:51:17 CET 2007
On Wed, 7 Nov 2007, Duncan Murdoch wrote:
> At first I thought you were complaining about the syntax, which I find
> ugly. There was a proposal last year to overload + to do concatenation
> of strings, so you'd type cat("x=" + x + "y=" + y + "\n"), but there was
> substantial resistance, on the grounds that + should be commutative.
My objection, at least, was that + should be *associative*. I don't think
anyone would expect a + b and b+a to be the same for strings, but I do
think the fact that (a+b)+c and a+(b+c) would be different (if some of a,
b,c were strings) has real potential for ugliness.
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help