Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-16 Thread Stephan Eggermont
Petr Fischer via Pharo-users wrote: Hello! Weird question: why I can't add instance variables to the Object class (for example "oid" or something else)? Is it due to some internal (and different) VM "class layouts"? Or - can I inject my own information to all existing objects (any class)? You mi

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-16 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Petr, Since you seem to want to add this (these) extra instance variable(s) in the context of some kind of persistence (objects being retrieved/created from/to some kind of database), perhaps subclassing all your objects from a PersistentObject class (that inherits from O

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-16 Thread James Foster
> On Jan 16, 2019, at 6:28 AM, Petr Fischer via Pharo-users > wrote: > > > From: Petr Fischer > Subject: Re: [Pharo-users] adding instance variables (data) to the Object > class > Date: January 16, 2019 at 6:28:44 AM PST > To: pharo-users@lists.pharo.org >

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-16 Thread Petr Fischer via Pharo-users
--- Begin Message --- Yes, due to the object layouts and strong connection of Object with VM, my idea can not be done that easily. I want to add some information (instance variables like OID [object id]) to some objects of any kind (some objects = persistent objects). I can do it with map (iden

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-16 Thread Richard O'Keefe
I am having a little trouble understanding how adding instance variables to Object is supposed to work. Where would an immediate object like a SmallInteger *put* such variables? What does it even *mean* for 0 and 1 to have instance variables? Do you really want to give an extra word of storage t

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-14 Thread Sean P. DeNigris
Pharo Smalltalk Users mailing list wrote > Or... what do you mean by "talents"? IIUC a talent is behavior like a trait, but that can be dynamically added and removed from anObject instead of being permanently bound to the class - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smallt

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-13 Thread Petr Fischer via Pharo-users
--- Begin Message --- It looks like I can't simply add statefull trait to the Object like this: ProtoObject subclass: #Object uses: TMyTrait instanceVariableNames: '' classVariableNames: 'DependentsFields' package: 'Kernel-Objects' After this, Pharo 7 VM goes to 10

Re: [Pharo-users] adding instance variables (data) to the Object class

2018-09-07 Thread Petr Fischer via Pharo-users
--- Begin Message --- I see... will test them, thanks! pf > Talents with statefull traits will help you > > пт, 7 сент. 2018 г., 9:08 Marcus Denker : > > > > > > > On 6 Sep 2018, at 23:35, Petr Fischer via Pharo-users < > > pharo-users@lists.pharo.org> wrote: > > > > > > *From: *Petr Fischer >

Re: [Pharo-users] adding instance variables (data) to the Object class

2018-09-07 Thread Denis Kudriashov
Talents with statefull traits will help you пт, 7 сент. 2018 г., 9:08 Marcus Denker : > > > On 6 Sep 2018, at 23:35, Petr Fischer via Pharo-users < > pharo-users@lists.pharo.org> wrote: > > > *From: *Petr Fischer > *Subject: **adding instance variables (data) to the Object class* > *Date: *6 Sep

Re: [Pharo-users] adding instance variables (data) to the Object class

2018-09-07 Thread Marcus Denker
> On 6 Sep 2018, at 23:35, Petr Fischer via Pharo-users > wrote: > > > From: Petr Fischer > Subject: adding instance variables (data) to the Object class > Date: 6 September 2018 at 23:35:26 CEST > To: pharo-users@lists.pharo.org > > > Hello! Weird question: why I can't add instance variab

[Pharo-users] adding instance variables (data) to the Object class

2018-09-06 Thread Petr Fischer via Pharo-users
--- Begin Message --- Hello! Weird question: why I can't add instance variables to the Object class (for example "oid" or something else)? Is it due to some internal (and different) VM "class layouts"? Or - can I inject my own information to all existing objects (any class)? Thanks! pf --- End