I cannot wait to get to play with this.

Btw, is it possible to have a slot per object? Or are slots only part of
the class definition?

I am thinking of several performance optimization scenarios that I saw in
Moose where we need to store a temporary value in an object as a cache as
part of a larger computation. Typically, for things like this you create
another structure in between, but the problem with that approach is that
you lose object identity and things become immediately too complicated.

If we would have a slot per object, we could use this mechanism in such a
way. I think there is a class of scenarios that can be simplified
significantly. If per object is not possible, we could somehow think of a
special slot that would hold a dictionary with instances as keys.

Cheers,
Doru


On Thu, Jul 3, 2014 at 11:32 AM, Marcus Denker <[email protected]>
wrote:

> This is now in 4.0 060.
>
> to play with it, execute:
>
> Object subclass: #B
>         slots: {#iv => TestSlot}
>         classVariableNames: ''
>         category: ‘Playground'
>
>
>
> On 03 Jul 2014, at 10:21, Marcus Denker <[email protected]> wrote:
>
> > Now classes with special Slots are shown with a special class definition
> (this is just a stand-in, not
> > final… e.g. we need to add first class globals and think about what to
> do with #category… so we
> > will see. For now please treat this as just a stand-in for playing with
> things.
> >
> >
> > <slots.png>
> >
> > The idea is that we need to actually use it and then see what to change
> in the next iteration.
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"

Reply via email to