From hadley at rice.edu  Wed May  4 18:24:18 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Wed, 4 May 2011 11:24:18 -0500
Subject: [Rd] Reference Classes: Accessing methods via [[...]], bug?
In-Reply-To: <4DC17C1F.4050504@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>
	<BANLkTik8K3kB-Y1-9jk+7HhPVdYA+=DW8w@mail.gmail.com>
	<4DC17C1F.4050504@r-project.org>
Message-ID: <BANLkTimquWB+LNJtg_AjWGrbqx0Z+beaWQ@mail.gmail.com>

>> 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.
>
> Thanks, I wasn't. ?Yes, interesting similar distinction between functional
> and "type" decomposition. ?An important associated aspect for us is the
> distinction between reference objects and "ordinary" R objects, not AFAICS
> conveyed by their more abstract treatment.

Another discussion I found useful was in SICP:
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-17.html#%_sec_2.4.3

I really like the metaphor of method dispatch as a table with types in
the columns and operations in the rows - then you can think of generic
functions oo as being row-based, and class based oo as column-based.

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