Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Sam Steingold <sds@gn...> - 2005-05-06 20:37:30
should we export defstruct MOP functions?
e.g., sys::structure-slots, sys::structure-kconstructor &c
- they take a structure class _name_
and work for both typed and untyped structures.
(setters are commented out -- why?)
what about clos::class-names (what's that?), clos::class-kconstructor &c
- they take an structure class _object_
and work only for untyped structures.
(setters are available).
this duplication confusing.
why two sets of accessors?
why one half is settable and the other is not?
which one should be exported?
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://pmw.org.il/> <http://www.mideasttruth.com/> <http://ffii.org/>
A computer scientist is someone who fixes things that aren't broken.
From: Sam Steingold <sds@gn...> - 2006-11-20 17:41:51
it has come to my attention that defstruct mop extensions are neither
exported nor documented.
structure-slots structure-direct-slots structure-instance-size
structure-kconstructor structure-boa-constructors structure-copier
do you think they should be exported from CLOS (and reexported from EXT
like all other CLOS extensions) or directly from EXT?
From: Bruno Haible <bruno@cl...> - 2006-11-21 14:23:58
> it has come to my attention that defstruct mop extensions are neither
> exported nor documented.
> structure-slots structure-direct-slots structure-instance-size
> structure-kconstructor structure-boa-constructors structure-copier
- For whom would they be useful? Is there some code in clocc/src/port/ that
could profit from it?
- What do other implementations (like SBCL or ACL) offer here?
> do you think they should be exported from CLOS (and reexported from EXT
> like all other CLOS extensions) or directly from EXT?
If they should be exported - depends on the 2 questions above - then
I'd say, directly from EXT, because the comments say this:
;; A kind of Meta-Object Protocol for structures.
;; These function apply to structures of any representation
;; (structure classes as well as subtypes of LIST or VECTOR).
;; This differs from the CLOS MOP
;; 1. in the use of a structure name (symbol) instead of a class,
;; 2. in the different set of available operations: classes in general
;; don't have kconstructors, boa-constructors, copier, predicate,
;; whereas on the other hand structures in general don't have a prototype
;; and finalization.
And if exported, some renaming would probably be in order:
structure-kconstructor -> structure-keyword-constructor.