summaryrefslogtreecommitdiff
path: root/meta-stuff.rst.txt
blob: c7fa181c4ad58759c7dbfaf5ed79b9c1a94e2d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
done bits
 
* fix all the ``*-into`` functions/methods to take the destination
  variable name as 1st argument (otherwise optional arguments become a
  mess)
 
* expose namespace open/close, and ``namespace $name; do …; done``
 
  - use them inside ``class_open`` / ``class_close``
 
``bos/mop/base`` + ``bos/mop/inheritance`` become ``bos/meta/class``
 
  * store class→metaclass association somewhere (global dictionary,
    probably)
 
  - when creating a class, create a metaclass instance and store it
  - the store must be pre-populated with metaclass instances for:
 
    + ``bos/meta/class`` → ``bos-dispatch/invoke bos/meta/class 1``
 
* add ``bos/meta/attribute``
 
  - store values in ``bos-namespaces/store-*-for-into attribute
    $attrname $defining_class $object_class $object_id`` (notice, we
    also need the class that owns the attribute, not just the class
    that generated the object, because attributes are local to the
    class, they're not inherited!)
 
  - ``get-value`` / ``set-value`` methods
  - add name, type, owning metaclass as attributes to itself
 
next bits…
 
* add attribute support to ``bos/meta/class``
 
  - ``find-attribute-into``
  - ``add-attribute``
  - add class, isa, mro, as attributes to the metaclass
 
  maybe done? very untested
 
* pre-populated metaclass instances for:
 
  - ``bos/meta/class`` → ``bos-dispatch/invoke bos/meta/class 1``
  - ``bos/meta/attribute`` → ``bos-dispatch/invoke bos/meta/class 2``
 
  and those instances' attributes must be manually stored
 
  setting up the isa/mro for those two is going to be *complicated*
 
* constructor should assign attributes
 
  - this will make ``has`` much simpler to write!
 
* formalise that ``bos-dispatch/invoke $class 0 $method $args`` is a
  class method invocation