Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-26 Thread Marcus Denker
On 25 Jun 2014, at 17:15, Marcus Denker marcus.den...@inria.fr wrote: - Opal needs to delegate code generation to the Slot. This is now done. Opal now, in the semantic analysis phase, annotates slot accesses as OCSlotVariable (OCInstanceVariable we can remove later). Then when

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-26 Thread Sven Van Caekenberghe
Thanks for taking care, these things are aways more work than expected. On 26 Jun 2014, at 15:06, Marcus Denker marcus.den...@inria.fr wrote: On 25 Jun 2014, at 17:15, Marcus Denker marcus.den...@inria.fr wrote: - Opal needs to delegate code generation to the Slot. This is now done.

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-26 Thread Marcus Denker
On 26 Jun 2014, at 15:19, Sven Van Caekenberghe s...@stfx.eu wrote: Thanks for taking care, these things are aways more work than expected. Indeed… and the code afterwards always looks so little and so simple ;-) Marcus On 26 Jun 2014, at 15:06, Marcus Denker

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-26 Thread Marcus Denker
On 25 Jun 2014, at 14:06, Marcus Denker marcus.den...@inria.fr 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

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-26 Thread Tudor Girba
I like these names. Doru On Thu, Jun 26, 2014 at 4:38 PM, Marcus Denker marcus.den...@inria.fr wrote: On 25 Jun 2014, at 14:06, Marcus Denker marcus.den...@inria.fr wrote: Hi, Already in Pharo3 all instance variables are described using meta-objects (so called slots). To make it

[Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Marcus Denker
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

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Tudor Girba
Very nice! Next would be an example of how to specialize a slot :) Doru On Wed, Jun 25, 2014 at 2:06 PM, Marcus Denker marcus.den...@inria.fr 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

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Marcus Denker
On 25 Jun 2014, at 14:16, Tudor Girba tu...@tudorgirba.com wrote: Very nice! Next would be an example of how to specialize a slot :) Yes, the next steps are: - introduce abstract superclass for Slot (I am not yet sure: will the be “Slot” and the default slots are “InstVarSlot”, or do I

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Norbert Hartl
Am 25.06.2014 um 14:22 schrieb Marcus Denker marcus.den...@inria.fr: On 25 Jun 2014, at 14:16, Tudor Girba tu...@tudorgirba.com wrote: Very nice! Next would be an example of how to specialize a slot :) Yes, the next steps are: - introduce abstract superclass for Slot (I am

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Torsten Bergmann
Norbert wrote: Could we name it InstanceVariableSlot then? Plse? +1 bye T.

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Marcus Denker
On 25 Jun 2014, at 14:41, Torsten Bergmann asta...@gmx.de wrote: Norbert wrote: Could we name it InstanceVariableSlot then? Plse? +1 Ok. The only downside is that there will be more to type in the class definition… else it is actually easier. Marcus

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Esteban A. Maringolo
Slot \SimpleSlot (current iv slot) \CollectionSlot \BitmapSlot Esteban A. Maringolo 2014-06-25 9:38 GMT-03:00 Norbert Hartl norb...@hartl.name: Am 25.06.2014 um 14:22 schrieb Marcus Denker marcus.den...@inria.fr: On 25 Jun 2014, at 14:16, Tudor Girba tu...@tudorgirba.com wrote: Very nice!

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Marcus Denker
On 25 Jun 2014, at 16:43, Esteban A. Maringolo emaring...@gmail.com wrote: Slot \SimpleSlot (current iv slot) Yes, the naming of that one… I think we just need to take the freedom of iterating. For now I called it “InstanceVariableSlot”, but that might be confusing and it is a long word.

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Esteban Lorenzano
On 25 Jun 2014, at 11:49, Marcus Denker marcus.den...@inria.fr wrote: On 25 Jun 2014, at 16:43, Esteban A. Maringolo emaring...@gmail.com wrote: Slot \SimpleSlot (current iv slot) Yes, the naming of that one… I think we just need to take the freedom of iterating. For now I called it

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Esteban A. Maringolo
2014-06-25 11:52 GMT-03:00 Esteban Lorenzano esteba...@gmail.com: On 25 Jun 2014, at 11:49, Marcus Denker marcus.den...@inria.fr wrote: On 25 Jun 2014, at 16:43, Esteban A. Maringolo emaring...@gmail.com wrote: Slot \SimpleSlot (current iv slot) Yes, the naming of that one… I think we

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Norbert Hartl
Am 25.06.2014 um 16:55 schrieb Esteban A. Maringolo emaring...@gmail.com: 2014-06-25 11:52 GMT-03:00 Esteban Lorenzano esteba...@gmail.com: On 25 Jun 2014, at 11:49, Marcus Denker marcus.den...@inria.fr wrote: On 25 Jun 2014, at 16:43, Esteban A. Maringolo emaring...@gmail.com wrote:

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Marcus Denker
On 25 Jun 2014, at 14:22, Marcus Denker marcus.den...@inria.fr wrote: On 25 Jun 2014, at 14:16, Tudor Girba tu...@tudorgirba.com wrote: Very nice! Next would be an example of how to specialize a slot :) Yes, the next steps are: - introduce abstract superclass for Slot For now

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Esteban A. Maringolo
2014-06-25 12:06 GMT-03:00 Norbert Hartl norb...@hartl.name: Am 25.06.2014 um 16:55 schrieb Esteban A. Maringolo emaring...@gmail.com: I don't like over descriptive class names. Because they restrict you from using it for other, unexpected, purposes or contexts. The question to me is why this

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Camille Teruel
On 25 juin 2014, at 14:06, Marcus Denker marcus.den...@inria.fr 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

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread Marcus Denker
On 25 Jun 2014, at 17:32, Camille Teruel camille.ter...@gmail.com wrote: On 25 juin 2014, at 14:06, Marcus Denker marcus.den...@inria.fr 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

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread stepharo
Now we should be careful that the reflective APIs for slots at object-level and at class-level don't clash. What I means is that if Point slotNamed: #x return a slot what is the selector that satisfies Point ?: #superclass -- Object. It's difficult to have an elegant and consistent naming

Re: [Pharo-dev] [Pharo4] Slots: API for Classes

2014-06-25 Thread stepharo
Yes… the problem is that the “Slot meta object” and the “Slot that stores something” use the same name… this was not a problem for instance variables as the where not reified. maybe on the class side it could be Point slotDefinitionNamed: At least this is clear and I like that. but nice