Hi all. I need to know how can i do if i want add new behaviour ( a new method ) to a single instance object of a class. It means not to add new selector to the class but i want a single instance responds that mesage. Where can i read about it? Tia Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán |
Hi. Look at project Talents https://github.com/tesonep/pharo-talents. Idea is to implement behaviour (also with state) in normal way with classes and then dynamically install it to any existing objects 2017-03-03 14:07 GMT+01:00 Pablo R. Digonzelli <[hidden email]>:
|
Thanks Denis, I will take a look . I think this is what i need. Tia Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán De: "Denis Kudriashov" <[hidden email]> Para: "Any question about pharo is welcome" <[hidden email]> Enviados: Viernes, 3 de Marzo 2017 10:11:53 Asunto: Re: [Pharo-users] adding messages dinamically to a single instance object Hi. Look at project Talents https://github.com/tesonep/pharo-talents. Idea is to implement behaviour (also with state) in normal way with classes and then dynamically install it to any existing objects 2017-03-03 14:07 GMT+01:00 Pablo R. Digonzelli <[hidden email]>:
|
Hi, could you describe why you need this ? Do you have a usecase ? Just interested to know, as i work on similar mechanisms. Steven.
Le 2017-03-03 14:55, Pablo R. Digonzelli a écrit :
--
kloum.io
|
Hi Steven . For the moment i just want to understand how it is possible. In the future may be i can apply this mechanism for future projects. Pablo Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán De: "Steven Costiou" <[hidden email]> Para: "Any question about pharo is welcome" <[hidden email]> CC: "Pablo Digonzelli" <[hidden email]> Enviados: Viernes, 3 de Marzo 2017 11:03:23 Asunto: Re: [Pharo-users] adding messages dinamically to a single instance object Hi, could you describe why you need this ? Do you have a usecase ? Just interested to know, as i work on similar mechanisms. Steven.
Le 2017-03-03 14:55, Pablo R. Digonzelli a écrit :
-- kloum.io
|
In reply to this post by pdigonzelli1
Pablo I would not use talents. You can use an anonymous classes. Have a look at the chapter of https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingLanguageKernels/4/artifact/build/book.pdf
-- Using Opera's mail client: http://www.opera.com/mail/ |
In reply to this post by pdigonzelli1
It is really possible and we are working on a new implementation of talents based on anonymous classes. Now what you should know is that - i would use this mechanism for debugging/tooling - i would try to avoid this as much as possible for domain modeling because it breaks all the hidden assumptions we have. stef
-- Using Opera's mail client: http://www.opera.com/mail/ |
Hi Stef. I was reading your link. I found it very interesting . I think i will working in that direction having in mind your advise. Tia Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán De: "stepharong" <[hidden email]> Para: "Steven Costiou" <[hidden email]>, "Pablo Digonzelli" <[hidden email]>, "Any question about pharo is welcome" <[hidden email]> Enviados: Sábado, 4 de Marzo 2017 6:18:24 Asunto: Re: [Pharo-users] adding messages dinamically to a single instance object It is really possible and we are working on a new implementation of talents based on anonymous classes. Now what you should know is that - i would use this mechanism for debugging/tooling - i would try to avoid this as much as possible for domain modeling because it breaks all the hidden assumptions we have. stef
-- Using Opera's mail client: http://www.opera.com/mail/ |
In reply to this post by pdigonzelli1
Hola Pablo, This technique is not something new, it was reported at least +20 years ago. You can read about it in a SO answer I wrote; http://stackoverflow.com/a/14202534 where there is a link to a foundational paper.2017-03-03 10:07 GMT-03:00 Pablo R. Digonzelli <[hidden email]>:
|
In reply to this post by pdigonzelli1
On Mon, 06 Mar 2017 05:19:35 +0100, Pablo R. Digonzelli <[hidden email]> wrote:
Black magic is seductive :) But it burns your soul :) Look like a good black sabbath song
-- Using Opera's mail client: http://www.opera.com/mail/ |
Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán De: "stepharong" <[hidden email]> Para: "Pablo Digonzelli" <[hidden email]> CC: "Steven Costiou" <[hidden email]>, "Any question about pharo is welcome" <[hidden email]> Enviados: Lunes, 6 de Marzo 2017 17:39:08 Asunto: Re: [Pharo-users] adding messages dinamically to a single instance object
On Mon, 06 Mar 2017 05:19:35 +0100, Pablo R. Digonzelli <[hidden email]> wrote:
Black magic is seductive :) But it burns your soul :) Look like a good black sabbath song
-- Using Opera's mail client: http://www.opera.com/mail/ |
Free forum by Nabble | Edit this page |