From hadley at rice.edu  Tue May  3 23:39:26 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Tue, 3 May 2011 16:39:26 -0500
Subject: [Rd] Reference Classes: Accessing methods via [[...]], bug?
In-Reply-To: <4DBDF900.1010601@r-project.org>
References: <SNT131-w42BCCDD218A68509A634CFB99D0@phx.gbl>
	<BANLkTi=GvhhFmDT1=8sf0j6cM8Tsx3QJ9Q@mail.gmail.com>
	<4DBDDA21.3020809@r-project.org> <4DBDE093.5080300@fhcrc.org>
	<4DBDF900.1010601@r-project.org>
Message-ID: <BANLkTik8K3kB-Y1-9jk+7HhPVdYA+=DW8w@mail.gmail.com>

> Part of the motivation for the reference classes was to bring a general OOP
> view to R. ?One can start from some essential concepts of objects and their
> properties, inheritance and class definition, as have evolved over a very
> long time.
>
> Next, there is a fundamental choice of paradigm between "encapsulated" OOP
> as the rest of the world knows it, and "functional" OOP as practiced by S
> and R, and a few other languages. ?While the two paradigms are quite
> different, there is no need to view them as opposed. ?They provide different
> advantages and tend to suit different goals--very roughly, functional object
> creation and reproducible results versus persistent objects whose properties
> one would like to have evolve over time using their encapsulated methods.

My biggest worry with the introduction of reference classes is that
many people will just stick to the style of OOP that they're familiar
with, and not bother to learn the strengths of the generic function
approach.

> As these remarks may suggest, I'm trying to write up this perspective in
> some detail.  To be continued ....

Are you familiar with "Concepts, Techniques, and Models of Computer
Programming" by van Roy and Haridi?  That's what really helped me to
understand the strengths and weaknesses of the various styles of
programming.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Reference Classes: Accessing methods via [[...]], bug?
Hadley Wickham