From: ilias
Subject: LISP - why learning / using structures ?
Date: 
Message-ID: <3D602641.6040802@pontos.net>
i've finished the online-book:

"Basic Lisp Techniques"
<http://www.franz.com/resources/educational_resources/cooper.book.pdf>

it's nice, start at chapter 3 and within 30 pages you get an overview.

now my question to the experienced, before i start the 'fat books' and 
/or and hyperspecs:

why should i waste braintime to learn structs?

isn't it better to drop them, and to start immediately with objects?

please try control your knowledge (don't go *to much* in details) !!!

From: Tim Bradshaw
Subject: Re: LISP - why learning / using structures ?
Date: 
Message-ID: <ey3znvjeok6.fsf@cley.com>
* at news wrote:
> why should i waste braintime to learn structs?

> isn't it better to drop them, and to start immediately with objects?

Structures *are* objects, of course, but: because they are typically
significantly faster and more compact.

Exact figures are obviously implementation dependent, but in my
experience the factor in time performance (creation, access, in the
best case (no user methods on MAKE-INSTANCE, or the accessor GF)) is
~2 across several current implementations, and size for small structs
or instances seems to be about the same.

--tim
From: Jochen Schmidt
Subject: Re: LISP - why learning / using structures ?
Date: 
Message-ID: <ajp8v6$k3$1@rznews2.rrze.uni-erlangen.de>
ilias wrote:

> i've finished the online-book:
> 
> "Basic Lisp Techniques"
> <http://www.franz.com/resources/educational_resources/cooper.book.pdf>
> 
> it's nice, start at chapter 3 and within 30 pages you get an overview.
> 
> now my question to the experienced, before i start the 'fat books' and
> /or and hyperspecs:
> 
> why should i waste braintime to learn structs?
> 
> isn't it better to drop them, and to start immediately with objects?
> 
> please try control your knowledge (don't go *to much* in details) !!!

It is often faster to access slots and to construct "structure objects". 
There are several constraints on structs which allow such optimizations. 
One of them is for example that the effects of redefining a structure are 
undefined.

IMHO you can concentrate on classes first since those are what should be 
used in most cases. Structures are mainly a feature when you need more 
performance and feel ok to pay this by a lack of flexibility in some 
regards.

ciao,
Jochen

--
http://www.dataheaven.de