Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Marcus Denker
>> > > Pardon my ignorance, but can Slot definitions be composed like traits? I was wondering the same already :-) e.g. I want to be able to make any slot a hidden slot without having to subclass it. > Because I can imagine wanting, say ProcessLocal + mmm... Static, without > having to combi

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Marcus Denker
> On 27 Feb 2015, at 17:53, Henrik Johansen > wrote: > > > > Would something like > slots: {#x . #y . #area -> (Cache: #calculateArea)) } > > Meaning :area is a Slot that holds a cached value, calculated when accessed > (by calling calculateArea), and nilled whenever slots accessed b

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Henrik Johansen
> On 27 Feb 2015, at 5:43 , Guillermo Polito wrote: > > Not yet, but that is a next step we were discussing the other day. > > El Fri Feb 27 2015 at 5:41:50 PM, Henrik Johansen > mailto:henrik.s.johan...@veloxit.no>> escribió: > >> On 26 Feb 2015, at 6:55 , Guillermo Polito >

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Guillermo Polito
Not yet, but that is a next step we were discussing the other day. El Fri Feb 27 2015 at 5:41:50 PM, Henrik Johansen < henrik.s.johan...@veloxit.no> escribió: > > On 26 Feb 2015, at 6:55 , Guillermo Polito > wrote: > > So I added an example of ProcessLocalSlot (like a thread local from other > l

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Henrik Johansen
> On 26 Feb 2015, at 6:55 , Guillermo Polito wrote: > > So I added an example of ProcessLocalSlot (like a thread local from other > languages) using the existing ProcessLocalVariable. A variable has different > values depending on the process the code is executing. > > Example of usage: > >

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Tudor Girba
Great catch. Thanks. Doru On Fri, Feb 27, 2015 at 11:23 AM, Alejandro Infante < alejandroinfant...@gmail.com> wrote: > First of all, the things that you are doing with slots are just amazing. I > never thought that there were so many cool stuff that could be done with > them. > > Now, two thing

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Guillermo Polito
Done https://pharo.fogbugz.com/f/cases/15007/Add-comment-on-ProcessLocalSlot-for-its-drawbacks El Fri Feb 27 2015 at 11:31:55 AM, Guillermo Polito < guillermopol...@gmail.com> escribió: > Haha, I didn't know that. I'll add that in the class comment. > > El Fri Feb 27 2015 at 11:23:59 AM, Alejand

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Guillermo Polito
Haha, I didn't know that. I'll add that in the class comment. El Fri Feb 27 2015 at 11:23:59 AM, Alejandro Infante < alejandroinfant...@gmail.com> escribió: > First of all, the things that you are doing with slots are just amazing. I > never thought that there were so many cool stuff that could b

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-27 Thread Alejandro Infante
First of all, the things that you are doing with slots are just amazing. I never thought that there were so many cool stuff that could be done with them. Now, two things to point out about the ProcessLocalSlot that probably not all know. 1) The value is stored weakly, an example of this would b

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-26 Thread Tudor Girba
Very very nice! This is really cool. Doru On Thu, Feb 26, 2015 at 7:01 PM, Sven Van Caekenberghe wrote: > *Very* nice ! > > > On 26 Feb 2015, at 18:55, Guillermo Polito > wrote: > > > > So I added an example of ProcessLocalSlot (like a thread local from > other languages) using the existing P

Re: [Pharo-dev] Slots: and ProcessLocalSlot

2015-02-26 Thread Sven Van Caekenberghe
*Very* nice ! > On 26 Feb 2015, at 18:55, Guillermo Polito wrote: > > So I added an example of ProcessLocalSlot (like a thread local from other > languages) using the existing ProcessLocalVariable. A variable has different > values depending on the process the code is executing. > > Example o

[Pharo-dev] Slots: and ProcessLocalSlot

2015-02-26 Thread Guillermo Polito
So I added an example of ProcessLocalSlot (like a thread local from other languages) using the existing ProcessLocalVariable. A variable has different values depending on the process the code is executing. Example of usage: Object subclass: #TestLocal slots: { #local => ProcessLocalSlot } classVa