From maechler at stat.math.ethz.ch  Wed Sep 17 12:48:02 2003
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Wed Sep 17 11:48:25 2003
Subject: [Rd] the empty class name
Message-ID: <16232.11730.679582.109335@gargle.gargle.HOWL>

As Henrik Bengtsson has just demonstrated on R-help,
it is currently valid to have *the* empty class name.
E.g.,
----------------------------------
print. <- function(x, ...) { 
       cat("Empty class ", x,"\n") 
       invisible(x) 
}

x <- 1:2; class(x) <- "" 
----------------------------------

works:

  > x
  Empty class  1 2 

I see that it also works in S+6  but still do wonder if this is
not rather an accident than a feature.

Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><


[Rd] the empty class name
Martin Maechler