[plt-scheme] The role of proper and improper lists?

From: Stephen De Gabrielle (stephen at degabrielle.name)
Date: Fri Jan 25 19:58:57 EST 2008

On Jan 25, 2008 2:32 PM, Robby Findler <robby at cs.uchicago.edu> wrote:
> On Jan 25, 2008 8:30 AM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> >
> > On Jan 25, 2008, at 9:16 AM, Stephen De Gabrielle wrote:
> >
> > > Good point,
> > > and where structs are insufficient use objects.
> > >
> > > what I struggle with is *when* to change from list to struct to
> > > object?
> >
> >
> > I go from structs to objects when I have several functions of the shape
> >
> >   ;;  f : StructOfFoo .. Other Types ... -> ...
> >
> > and I wish to present this code to students past their first year or
> > maintain it for a while.
> >
> > I stick with structs when first-year students may look at my code.
> >
> > I never replace lists with structs or objects. -- Matthias
>
> But you probably also never use lists of a fixed length to represent
> things that probably should have been structs, either.
>
> Robby
>
Thanks Matthias, seems so obvious now I think about it...but I didn't before.

Thanks Robby, I think I have that disease, but in the form of nested
association lists or hash tables, or -lately- 'collection' objects.
(must look at htdp)

Cheers,

Stephen

--
Stephen De Gabrielle
s.degabrielle at ucl.ac.uk
Telephone +44 (0)20 7679 5242 (x45242)
Mobile                  079 851 890 45
Project: Making Sense of Information (MaSI)
http://www.uclic.ucl.ac.uk/annb/MaSI.html

UCLIC: University College London Interaction Centre
http://www.uclic.ucl.ac.uk/

Remax House - 31/32 Alfred Place
London - WC1E 7DP


Posted on the users mailing list.