[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
goops proposal: proper struct classes
From: |
Andy Wingo |
Subject: |
goops proposal: proper struct classes |
Date: |
Sun, 01 May 2011 22:19:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hello all,
If you know GOOPS, then you know that we have classes, rooted at
<class>. And indeed <class> shows up a lot in documentation and in
code. But that's not how it is in CLOS: our <class> corresponds to
their `standard-class'. They have a superclass, called `class', which
is the real root, and from which e.g. structure classes are derived.
We need to do this. Currently, class-of on a struct/record data type
gives a useless class that can't instantiate instances, doesn't know its
slots, and does not reflect the vtable hierarchy.
So we need a <basic-class>, interposed between <class> and <object>,
which will be the real root of our class meta-object hierarchy.
I noticed this while fixing some weak hash table-related bugs today, and
I saw set-struct-vtable-name!, which ends up causing some crazy stuff to
happen (exporting a stub class from (oop goops)), and noticed how wrong
all this was.
Comments?
Andy
--
http://wingolog.org/
- goops proposal: proper struct classes,
Andy Wingo <=