Traits in Gemstone?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Traits in Gemstone?

Bart Gauquie
Dear list,

Does Gemstone supports traits, or something similar like traits?

Kind Regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

Steve Wart-2
I doubt it, but Dale has a pretty awesome track record and a good set
of tools for porting Squeak capabilities to GemStone.

Here is the latest list I'm aware of
http://scg.unibe.ch/research/traits. If someone does a port to
GemStone they should let these guys know about it.

I was a little disappointed (but maybe not surprised) that the
optimizations described in "Applying Traits to the Smalltalk
Collection Hierarchy" seem to be part of the core Pharo. I had assumed
that was one of the motivations for the fork. I'm sure this has been
discussed elsewhere but it's nothing I ever followed, as I only
recently discovered Traits when I started reading about Scala.

My sense is that Smalltalk is too entrenched in the old way of
thinking for traits to make much of a difference here. It's too bad,
because I've been poring over complex Smalltalk frameworks all day
that could certainly have benefited from using traits. I'm quite
excited about Scala, but my FP-fu isn't ready to take on a web
framework like Lift just yet...

Cheers
Steve

On Wed, Aug 11, 2010 at 3:29 AM, Bart Gauquie <[hidden email]> wrote:

> Dear list,
> Does Gemstone supports traits, or something similar like traits?
>
> Kind Regards,
> Bart
> --
> imagination is more important than knowledge - Albert Einstein
> Logic will get you from A to B. Imagination will take you everywhere -
> Albert Einstein
> Learn from yesterday, live for today, hope for tomorrow. The important thing
> is not to stop questioning. - Albert Einstein
> The true sign of intelligence is not knowledge but imagination. - Albert
> Einstein
> However beautiful the strategy, you should occasionally look at the results.
> - Sir Winston Churchill
> It's not enough that we do our best; sometimes we have to do what's
> required. - Sir Winston Churchill
>
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

Tobias Pape
Hi,

Am 2010-08-11 um 18:07 schrieb Steve Wart:

> I doubt it, but Dale has a pretty awesome track record and a good set
> of tools for porting Squeak capabilities to GemStone.
>
> Here is the latest list I'm aware of
> http://scg.unibe.ch/research/traits. If someone does a port to
> GemStone they should let these guys know about it.
>
> I was a little disappointed (but maybe not surprised) that the
> optimizations described in "Applying Traits to the Smalltalk
> Collection Hierarchy" seem to be part of the core Pharo. I had assumed
> that was one of the motivations for the fork. I'm sure this has been
> discussed elsewhere but it's nothing I ever followed, as I only
> recently discovered Traits when I started reading about Scala.
>
It’s major effort to change the Collection hierarchy, so, it is
probably a matter of time.

> My sense is that Smalltalk is too entrenched in the old way of
> thinking for traits to make much of a difference here. It's too bad,
> because I've been poring over complex Smalltalk frameworks all day
> that could certainly have benefited from using traits. I'm quite
> excited about Scala, but my FP-fu isn't ready to take on a web
> framework like Lift just yet...

Hmmm… Traits are available in both, Squeak 4 and Pharo, afaik.
Pharo uses the implementation described on the site you referenced;
Squeak uses a replacement for these, called NanoTraits, that should be
smaller/more lightweight and unloadable from Squeak.
  The rationale here is that not everything needs traits to be
well-designed or well-implemented. I think thats one point why traits
are not yet part of the Collection hierarchy. Another point would be that
Traits are bound statically to classes and not dynamically to objects.
I think such a concept would match more with the ’lively’ Smalltalk world.

So Long,
        -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

SeanTAllen
In reply to this post by Steve Wart-2
Just a note, Scala traits aren't really the same as Traits as
described in the referenced paper.
They are closer to Ruby's mixin capabilities.

Roles in Perl 5's moose and Perl 6 however are traits.

On Wed, Aug 11, 2010 at 12:07 PM, Steve Wart <[hidden email]> wrote:

> I doubt it, but Dale has a pretty awesome track record and a good set
> of tools for porting Squeak capabilities to GemStone.
>
> Here is the latest list I'm aware of
> http://scg.unibe.ch/research/traits. If someone does a port to
> GemStone they should let these guys know about it.
>
> I was a little disappointed (but maybe not surprised) that the
> optimizations described in "Applying Traits to the Smalltalk
> Collection Hierarchy" seem to be part of the core Pharo. I had assumed
> that was one of the motivations for the fork. I'm sure this has been
> discussed elsewhere but it's nothing I ever followed, as I only
> recently discovered Traits when I started reading about Scala.
>
> My sense is that Smalltalk is too entrenched in the old way of
> thinking for traits to make much of a difference here. It's too bad,
> because I've been poring over complex Smalltalk frameworks all day
> that could certainly have benefited from using traits. I'm quite
> excited about Scala, but my FP-fu isn't ready to take on a web
> framework like Lift just yet...
>
> Cheers
> Steve
>
> On Wed, Aug 11, 2010 at 3:29 AM, Bart Gauquie <[hidden email]> wrote:
>> Dear list,
>> Does Gemstone supports traits, or something similar like traits?
>>
>> Kind Regards,
>> Bart
>> --
>> imagination is more important than knowledge - Albert Einstein
>> Logic will get you from A to B. Imagination will take you everywhere -
>> Albert Einstein
>> Learn from yesterday, live for today, hope for tomorrow. The important thing
>> is not to stop questioning. - Albert Einstein
>> The true sign of intelligence is not knowledge but imagination. - Albert
>> Einstein
>> However beautiful the strategy, you should occasionally look at the results.
>> - Sir Winston Churchill
>> It's not enough that we do our best; sometimes we have to do what's
>> required. - Sir Winston Churchill
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

Dale Henrichs
In reply to this post by Bart Gauquie
Bart Gauquie wrote:

> Dear list,
>
> Does Gemstone supports traits, or something similar like traits?
>
> Kind Regards,
>
> Bart
>
> --
> imagination is more important than knowledge - Albert Einstein
> Logic will get you from A to B. Imagination will take you everywhere -
> Albert Einstein
> Learn from yesterday, live for today, hope for tomorrow. The important
> thing is not to stop questioning. - Albert Einstein
> The true sign of intelligence is not knowledge but imagination. - Albert
> Einstein
> However beautiful the strategy, you should occasionally look at the
> results. - Sir Winston Churchill
> It's not enough that we do our best; sometimes we have to do what's
> required. - Sir Winston Churchill

Bart,

I would say that Traits for GemStone is on the list but it's probably
around the middle of the list...

Every request adds a little bit more weight to moving it up the list ...
now if someone else took a serious look at adding Traits to GemStone and
came up with a laundry list of things that needed to be done to the base
(if anything at all), then that would definitely bump it up the list:)

Dale
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

Carla F. Griggio
It would be awesome to have Traits in Gemstone, I really miss them :(
Plus projects between Pharo (don't know if Squeak also) and Gemstone would be more portable :)

On Wed, Aug 11, 2010 at 2:52 PM, Dale Henrichs <[hidden email]> wrote:
Bart Gauquie wrote:
Dear list,

Does Gemstone supports traits, or something similar like traits?

Kind Regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

Bart,

I would say that Traits for GemStone is on the list but it's probably around the middle of the list...

Every request adds a little bit more weight to moving it up the list ... now if someone else took a serious look at adding Traits to GemStone and came up with a laundry list of things that needed to be done to the base (if anything at all), then that would definitely bump it up the list:)

Dale

Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

Tobias Pape

Am 2010-08-11 um 21:57 schrieb Carla F. Griggio:

> It would be awesome to have Traits in Gemstone, I really miss them :(
> Plus projects between Pharo (don't know if Squeak also) and Gemstone would be more portable :)

It depends. The same way, Mixins would be cool [http://bracha.org/mwp.html]

just my 2ct
        -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

SeanTAllen
On Thu, Aug 12, 2010 at 12:43 AM, Tobias Pape <[hidden email]> wrote:

>
> Am 2010-08-11 um 21:57 schrieb Carla F. Griggio:
>
>> It would be awesome to have Traits in Gemstone, I really miss them :(
>> Plus projects between Pharo (don't know if Squeak also) and Gemstone would be more portable :)
>
> It depends. The same way, Mixins would be cool [http://bracha.org/mwp.html]
>
> just my 2ct
>        -Tobias

I prefer traits to mixins.
just my 2ct.
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

NorbertHartl

On 12.08.2010, at 13:40, Sean Allen wrote:

> On Thu, Aug 12, 2010 at 12:43 AM, Tobias Pape <[hidden email]> wrote:
>>
>> Am 2010-08-11 um 21:57 schrieb Carla F. Griggio:
>>
>>> It would be awesome to have Traits in Gemstone, I really miss them :(
>>> Plus projects between Pharo (don't know if Squeak also) and Gemstone would be more portable :)
>>
>> It depends. The same way, Mixins would be cool [http://bracha.org/mwp.html]
>>
>> just my 2ct
>>        -Tobias
>
> I prefer traits to mixins.
> just my 2ct.

The application of both seems comparable. The mixins feel more like prototyping which probably is nice if you do it at runtime (hence the operator |>). But traits does just more than those mixins. Traits have a defined interface between the functionality that is provided by the trait and that is consumed by something that is composed with a trait (required methods). Furthermore traits describe and have a descriptive way how to do conflict resolution. And that is important if you want to create permanent system classes that are composed from traits.

Today they are a lot of systems that are inspired by traits.

- moose (http://www.iinteractive.com/moose/) used to be a MOP for perl. Now it is the object system in perl6
- joose (http://code.google.com/p/joose-js/) is a javascript port of moose to javascript
- what comes probably after ECMAScript 5 contains traits as well (http://code.google.com/p/es-lab/wiki/Talks)

my 2ct

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

SeanTAllen
I think that was an excellent summation.

On Thu, Aug 12, 2010 at 8:04 AM, Norbert Hartl <[hidden email]> wrote:

>
> On 12.08.2010, at 13:40, Sean Allen wrote:
>
>> On Thu, Aug 12, 2010 at 12:43 AM, Tobias Pape <[hidden email]> wrote:
>>>
>>> Am 2010-08-11 um 21:57 schrieb Carla F. Griggio:
>>>
>>>> It would be awesome to have Traits in Gemstone, I really miss them :(
>>>> Plus projects between Pharo (don't know if Squeak also) and Gemstone would be more portable :)
>>>
>>> It depends. The same way, Mixins would be cool [http://bracha.org/mwp.html]
>>>
>>> just my 2ct
>>>        -Tobias
>>
>> I prefer traits to mixins.
>> just my 2ct.
>
> The application of both seems comparable. The mixins feel more like prototyping which probably is nice if you do it at runtime (hence the operator |>). But traits does just more than those mixins. Traits have a defined interface between the functionality that is provided by the trait and that is consumed by something that is composed with a trait (required methods). Furthermore traits describe and have a descriptive way how to do conflict resolution. And that is important if you want to create permanent system classes that are composed from traits.
>
> Today they are a lot of systems that are inspired by traits.
>
> - moose (http://www.iinteractive.com/moose/) used to be a MOP for perl. Now it is the object system in perl6
> - joose (http://code.google.com/p/joose-js/) is a javascript port of moose to javascript
> - what comes probably after ECMAScript 5 contains traits as well (http://code.google.com/p/es-lab/wiki/Talks)
>
> my 2ct
>
> Norbert
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Traits in Gemstone?

Dale Henrichs
James and Martin took a closer look at Traits in Pharo and it seems that
adding Traits wouldn't really require any special GemStone handling
(other than porting the code to GemStone).

The two additional pieces of work that would need to be done would be to
pick up the Monticello additions that handle traits correctly and we'd
probably need to port/update to a later version of OB so that we'd have
the Traits tool extensions available ...

If I'm not mistaken we will need to move to a later version of OB to
support GemTools on Pharo 1.1 anyway...

I'm getting down and dirty in Monticello right now, so I might take a
look at the Trait support in Pharo and see if it looks like a lot of
work or not ....

That leaves the basic port of Traits... which presumably could be done
without Monticello or tools support:)

Dale

Sean Allen wrote:

> I think that was an excellent summation.
>
> On Thu, Aug 12, 2010 at 8:04 AM, Norbert Hartl <[hidden email]> wrote:
>> On 12.08.2010, at 13:40, Sean Allen wrote:
>>
>>> On Thu, Aug 12, 2010 at 12:43 AM, Tobias Pape <[hidden email]> wrote:
>>>> Am 2010-08-11 um 21:57 schrieb Carla F. Griggio:
>>>>
>>>>> It would be awesome to have Traits in Gemstone, I really miss them :(
>>>>> Plus projects between Pharo (don't know if Squeak also) and Gemstone would be more portable :)
>>>> It depends. The same way, Mixins would be cool [http://bracha.org/mwp.html]
>>>>
>>>> just my 2ct
>>>>        -Tobias
>>> I prefer traits to mixins.
>>> just my 2ct.
>> The application of both seems comparable. The mixins feel more like prototyping which probably is nice if you do it at runtime (hence the operator |>). But traits does just more than those mixins. Traits have a defined interface between the functionality that is provided by the trait and that is consumed by something that is composed with a trait (required methods). Furthermore traits describe and have a descriptive way how to do conflict resolution. And that is important if you want to create permanent system classes that are composed from traits.
>>
>> Today they are a lot of systems that are inspired by traits.
>>
>> - moose (http://www.iinteractive.com/moose/) used to be a MOP for perl. Now it is the object system in perl6
>> - joose (http://code.google.com/p/joose-js/) is a javascript port of moose to javascript
>> - what comes probably after ECMAScript 5 contains traits as well (http://code.google.com/p/es-lab/wiki/Talks)
>>
>> my 2ct
>>
>> Norbert
>>
>>