Hi,
Already in Pharo3 all instance variables are described using meta-objects (so called slots).
To make it easier to access the slots, I added some simple methods to ClassDescription on 4.0 043,
Now we can do e.g.:
Context slots
Context allSlots
Point hasSlotNamed: #x
Point slotNamed: #x
As Camille noted, we need a different API on the Objects to read and write slots.
We came up with:
#readSlot:
#readSlotNamed:
#writeSlot:value:
#writeSlotNamed:value:
#writeToSlot:of: (this is what the compiler generates to reflectively write a slot)
e.g.
5@3 readSlot: (Point slotNamed: #x)
5@3 writeSlotNamed: #x value: 7
Marcus