Re: R-alpha: compatibility

Z. Todd Taylor (
Fri, 21 Feb 1997 07:46:31 -0800

Date: Fri, 21 Feb 1997 07:46:31 -0800
From: (Z. Todd Taylor)
Subject: Re: R-alpha: compatibility

Jim Lindsey <> wrote:

> The thing that I would like to get rid of is recycling vectors. In my
> experience with R, this is the biggest danger, directly in data
> analysis itself, not just in programming. If there is going to be a
> compatibility mode, I suggest that this be turned off by default as
> well as stretchy vectors.

I have to disagree.  "Recycling vectors" are one of the core
characteristics that make the S language what it is.  Turn
them off and "x + 1" won't work any more because '1' is not as
long as 'x'.  We'd be back to looping over the the 'x' vector
adding '1' to each element.

Perhaps more than anything else, the notion of a vector as the
most primitive data type allows S/R programs to be about
one-tenth the length they would be in most other high-level
languages.  The last thing we want to do is cripple vectors.

>   I see compatibility mode as something to be turned on in those rare
> occasions when it is necessary to run some S-Plus code without trying
> to fix it up for R. Something like being able to compile old Fortran 4
> code with a Fortran 77 or later compiler, or non-ANSI C code.
>   Jim

I tend to agree in spirit, but I've got so many megabytes of S
code that it'll be a lot of years before the need for
compatibility mode will be rare.

Incompatibilities should be introduced only where they offer
significant advantages over the old way and probably never(*)
when they involve changing a core idiom of the language.


(*) Of course, I never say never.

Z. Todd Taylor
Pacific Northwest National Laboratory
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: