On 11/8/2007 12:57 PM, hadley wickham wrote:
>> 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.
> 
> You're assuming an automatic cast from numbers into strings?  What if
> a + "4" threw an error?

Disallowing mixed types was one variation on the proposal, but I'd say 
that misses the benefit of making computed strings easier to read.  If 
they're full of "as.character(x)" explicit conversions, they're no 
easier to read than paste() (which doesn't need explicit conversions).

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to