Re: Structures





tim wrote:
On Sat, 29 Mar 2008 18:20:32 -0400, Ken Tilton wrote:


tim wrote:

On Sat, 29 Mar 2008 13:06:23 -0700, Tayssir John Gabbour wrote:

Hunh? As you noted, that is merely the default. It is no big deal to supply the :conc-name option.

kenny



The language has a spec of 1,000 pages and a huge number of productions.
Some structures can be reused across multiple productions but many can't.
So there are many structures and many fields. Also if overriding one needs
to check that the name is not a duplicate, used elsewhere, which is more
work.

(* trivial large)
=> large

With objects it might not be so large a job because generic
functions get built that can be shared (same name) across many different
classes.

Nice speech, bad assumption: what makes you think I was going to supply the value nil along with the :conc-name option? Or did I guess wrong at the point you were making? You never quite made it explicit, but it sounded as if you were concerned about name clashes.

Allow me to abbreviate the confusion:

(defstruct (newsgroup (:conc-name ng-))
name address messages)

As for performance, CLOS is not slow, structs are just much faster. The argument against premature optimization is not one in favor of seeing a high-performance situation and deliberately using something slower than necessary. So if someone happens to have a need to allocate a kazillion thingys, their only problem is coming up with an abbreviateion for thingy when they use defstruct. I would go with th-.

hth, kenny

--
http://smuglispweeny.blogspot.com/
http://www.theoryyalgebra.com/

"In the morning, hear the Way;
in the evening, die content!"
-- Confucius
.