> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Lumley
> Sent: Sunday, August 27, 2006 6:22 PM
> To: John Chambers
> Cc: [email protected]
> Subject: Re: [Rd] "+" for character method...
>
> On Sat, 26 Aug 2006, John Chambers wrote:
>
> > Well, two comments, in two non-compatible directions.
> >
> > 1. I have to say that I find the idea of using "+" to
> paste character
> > strings together aesthetically ugly.
>
> Hear, hear!
>
> In a language where you can define new binary operators
> easily making the same operator do addition and concatenation
> really doesn't seem a good idea. It is done in some other
> languages, but so is using the same operator for printing and
> multiplying by powers of two.
>
> Lack of commutativity is obvious, but lack of associativity
> seems much more dangerous. Suppose x, y, and z are a mixture
> of strings and numbers.
> Hands up everyone who knows (without cheating) whether x+y+z
> would be interpreted the same way in R (with the current
> parser) as in Java or Delphi or Python (and are these all the
> same?). Which of
> "two + two = " + 2 + 2
> 2 + 2 + " = two + two"
> would be correct?
"two + two = " * 2 + 2
2 + 2 * " = two + two"
are both "correct" :-))
Latchezar Dimitrov
Analyst/Programmer
Wake Forest University School of Medicine
However the opinons are mine only.
>
> -thomas
>
> Thomas Lumley Assoc. Professor, Biostatistics
> [EMAIL PROTECTED] University of Washington, Seattle
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel