[R] Can we get rid of && and ||?

Dan E. Kelley kelley at Phys.Ocean.Dal.CA
Thu Apr 13 14:12:12 CEST 2000

> > I have some doubts about the implementation of the operators  '&&'  and
> > '||'. I only discuss  '&&'  here. The reason: One of my students tried

One thing I like about Perl is that it defines 'and' and (rhyming
here, can't help it) 'or' as well as the operators that C programmers

I've known many folks who were confused with & and && in C, but C
needs both bitwise and logical operators, so we're stuck.

Speaking of stuck, R is stuck too, since it strives to be like S.  A
way to improve things might be to provide warnings of things that are
legal but that might indicate errors of programming.  Perl does this
quite effectively, which is worth mentioning since it too is caught in
the bind of sticking with poor choices made in the adolescent stage of

Dan E. Kelley                                         phone:(902)494-1694
Oceanography Department, Dalhousie University           fax:(902)494-2885
Halifax, Nova Scotia                             mailto:Dan.Kelley at Dal.CA 
Canada B3H 4J1       http://www.phys.ocean.dal.ca/~kelley/Kelley_Dan.html

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list