Re: R-alpha: ! incompatibility -- I agree with `design' choice

Martin Maechler (
Tue, 17 Sep 96 10:40:33 +0200

Date: Tue, 17 Sep 96 10:40:33 +0200
Message-Id: <9609170840.AA05889@>
From: Martin Maechler <>
In-Reply-To: <> (message from Ross
Subject: Re: R-alpha: ! incompatibility -- I agree with `design' choice

>>>>> "Ross" == Ross Ihaka <> writes:

    Ross> Thomas Lumley writes:
    >>  Another minor incompatibility
    R> if (!1) T else F
    >> Error: unary ! is only defined for logical vectors
    S> if (!1) T else F
    >> [1] F
    >> !as.logical() works, though.

    Ross> This was a deliberate ``design'' choice, designed to help detect
    Ross> bugs.  It would be very easy to change.  Is it important?  Ross

I think it was a good design choice
- it helps to prevent bugs (as said)

- is also helps to prevent  ``cryptic programming style''
	instead of		if(!length(x))
	in R, you'll have to use
	which is longer but much more readable.

In my last high-school years, I did  learn APL
 (on a tele-type terminal to an IBM/360 main frame) and wrote
extensive 'cryptic' programs (a prime tester in one APL line, ...);
I've gone the long way to here,
 where I am convinced of the importance of readable code very much..

((I even think a few more line of comments in the R code would not really
  harm... ;-) ))


r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: