[Gd-hackers] Instatiating <class> at runtime

Andreas Bogk andreas at andreas.org
Wed Nov 14 16:35:29 CET 2007


Thomas Christian Chust schrieb:

> I wonder whether there is a deeper reason for this behaviour. A quick
> look at d2c/runtime/dylan/class.dylan shows that most of the code
> required to support runtime class creation seems to be there, but
> commented out. The only really strange thing is the required
> initialization keyword #"class-bucket" for <class>, the purpose of which
> is unclear to me.

class-bucket is used for the efficient implementation of subtype? and
instance? checks.  If you add classes at runtime, you need to recompute
the decision matrix and fill in these values in all <class>es.  Stealing
the code from compile time should just work.

I see no deeper reason why make(<class>) is unavailable, except that
nobody got around doing it yet.  So play with it and let us know.

Andreas




More information about the hackers mailing list