I like these names. Doru
On Thu, Jun 26, 2014 at 4:38 PM, Marcus Denker <[email protected]> wrote: > > On 25 Jun 2014, at 14:06, Marcus Denker <[email protected]> wrote: > > 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 > > > This is in the issue tracker: > https://pharo.fogbugz.com/f/cases/13418/reflective-API-for-Slots-on-Object > > Marcus > > -- www.tudorgirba.com "Every thing has its own flow"
