From f54faf130e4a1f6fb75eba1634bb07a9adc038a6 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Fri, 29 Nov 2024 15:37:04 -0600 Subject: mop note --- README.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'README.txt') diff --git a/README.txt b/README.txt index 0221931..81933f3 100644 --- a/README.txt +++ b/README.txt @@ -216,3 +216,37 @@ │ │ │ iv. Does interleaving all three passes improve performance? │ ╰──────────────────────────────────────────────────────────────────────────────╯ + +╭──────────────────────────────────────────────────────────────────────────────╮ +│ The Meta-Object Protocol (i.e., the scary parts of the object system) │ +╞══════════════════════════════════════════════════════════════════════════════╡ +│ The object system supports a meta-object protocol inspired by the original │ +│ MOP as implemented in most Common Lisp implementations, but with a few parts │ +│ cleaned up and simplified. │ +│ │ +│ The pre-defined classes are either BUILTIN-CLASSes or STANDARD-CLASSes. The │ +│ main difference between the two is that only STANDARD-CLASSes have a slots │ +│ array. STANDARD-CLASS may be subclassed, allowing user-defined metaclasses │ +│ to be defined. BUILTIN-CLASS may not be subclassed. │ +│ │ +│ The class hierarchy for pre-defined classes is as follows: │ +│ │ +│ t │ +│ ┌───────────────────┴────────────────┐ │ +│ builtin-object │ │ +│ ┌────┬───┬─────────┬──────┬─────┼───────────────┐ │ │ +│ integer │ symbol sequence │ character hashtable │ │ +│ ┌──┴──┐ └──┐│ ┌──┴──┐ │ ┌───────┴───────┐ │ │ +│ bignum fixnum ││ list vector └─────┐ hashtable-eq hashtable-equal │ │ +│ ┌───────┬───┘└──┐┌─┴──┐ └┬───… │ │ │ +│ method package null cons string function │ │ +│ ┌─────────────────┬────────┴───────┬─────────────────┐ │ │ +│ builtin-function compiled-function generic-function threaded-function │ │ +│ │ │ +│ ┌─────────────────────────────────────┘ │ +│ standard-object │ +│ ┌─────────────────────┬─┴────────────────────┐ │ +│ class direct-slot-definition effective-slot-definition │ +│ ┌──────┴──────┐ │ +│ builtin-class standard-class │ +╰──────────────────────────────────────────────────────────────────────────────╯ -- cgit v1.2.3