From Martin Maechler <maechler@stat.math.ethz.ch>  Thu May  1 16:47:36 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Thu, 1 May 97 17:47:36 +0200
Subject: R-alpha: ==NULL
In-Reply-To: <Pine.SUN.3.95.970430093849.302A-100000@zen> (message from Thomas
 Lumley on Wed, 30 Apr 1997 09:42:52 -0700 (PDT))
Message-ID: <9705011547.AA01745@>

>>>>> "Tom" == Thomas Lumley <thomas@biostat.washington.edu> writes:

    Tom> Any comparison with NULL generates an error Error: comparison is
    Tom> possible only for vector types whereas in S(-PLUS) it gives NA,
    Tom> which seems more sensible.

    Tom> Along similar lines, comparison with a length 0 vector returns
    Tom> logical(0) in R but NA in S.

Is n't  logical(0)  more  logical than  NA ?

I agree that it would be best  (convenience)
if   'NULL==1' returned the same as 'numeric(0)==1'.

At the moment, I don't see why compatibility with S  should be important
here:
		if( NULL == anything)  
or, e.g.,	if( numeric(0) == numeric(0) )

give an error anyway, i.e., you have to test for length 0 _anyway_
in the cases where one comparison argument may have zero length.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: ==NULL
Martin Maechler