From Roger.Bivand at nhh.no  Wed Sep 27 08:26:10 2006
From: Roger.Bivand at nhh.no (Roger Bivand)
Date: Wed, 27 Sep 2006 08:26:10 +0200 (CEST)
Subject: [Rd] standardization of slot access
In-Reply-To: <87u02ub2ox.fsf@patagonia.sebmags.homelinux.org>
Message-ID: <Pine.LNX.4.44.0609270821100.28375-100000@reclus.nhh.no>

On Tue, 26 Sep 2006, Sebastian P. Luque wrote:

> Thank you all for your comments, which confirm the feeling I had that
> 'slot' is only needed in the rare occasions Roger mentioned.  Although
> 'slot' is an accessor function, it seems it's not quite analogous to
> functions or methods for accessing components of objects.
> 

I find that slot() is useful in explaining to users what is going on. I 
also find that used inside s/lapply that say function(x) slot(x, "y") is a 
natural way to access contents of lists of objects. So I wouldn't conclude 
that it is only rarely used, and would recommend its use in explaining to 
students/users what is going on in new-style objects.

Roger

> 
> Cheers,
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




[Rd] standardization of slot access
Roger Bivand