Slots (was Re: Test expectation language (was Re: [squeak-dev] The Inbox: CollectionsTests-dtl.209.mcz))

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

Slots (was Re: Test expectation language (was Re: [squeak-dev] The Inbox: CollectionsTests-dtl.209.mcz))

Frank Shearar-3
On 5 January 2014 22:28, Chris Muller <[hidden email]> wrote:

> Colin Putney said at some point:

>> I much prefer the Smalltalk community's tendency to build layers of
>> abstraction, while sticking to idiomatic Smalltalk. DSLs have their uses,
>> ... snip...
>
> Yes.  I've always liked how everything we do in Smalltalk is built on
> an aggregation of just 3 or 4 concepts, and that's it.  THAT is pretty
> slick in itself.  Anything above that is "magic" and should pay
> _really_ good ROI to justify its existence (e.g., way more than simply
> aesthetics).  Another example I can think of are those new special
> inst-vars in Pharo (having trouble remembering the name, "slots?") to
> define all sorts of RDBMS-style checks, etc.  I would rather do that
> simply via the same few Smalltalk concepts as everything else.
> Instantiation, setting state, and message-sending..

Slots [1] are just ("just") instance variables promoted to first class
citizens. They do for instance variables what Metaclass does for Class
- they extend Smalltalk's metaobject protocol [2] to cover instance
variables. This lets you intercept reads and writes to the instance
variables, and all sorts of interesting stuff. It's still just
standard Smalltalk.

Seems like a perfectly sensible thing to do.

frank

[1] http://hal.inria.fr/docs/00/64/17/16/PDF/Verw11b-OOSPLA11-FlexibleObjectLayouts.pdf

[2] https://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol,
praised by Alan Kay in his OOPSLA 1997 speech as (something like) "the
best book written in 10 years.. but why did they have to write it in
Lisp?"

Reply | Threaded
Open this post in threaded view
|

Re: Slots (was Re: Test expectation language (was Re: [squeak-dev] The Inbox: CollectionsTests-dtl.209.mcz))

Chris Muller-4
>>> I much prefer the Smalltalk community's tendency to build layers of
>>> abstraction, while sticking to idiomatic Smalltalk. DSLs have their uses,
>>> ... snip...
>>
>> Yes.  I've always liked how everything we do in Smalltalk is built on
>> an aggregation of just 3 or 4 concepts, and that's it.  THAT is pretty
>> slick in itself.  Anything above that is "magic" and should pay
>> _really_ good ROI to justify its existence (e.g., way more than simply
>> aesthetics).  Another example I can think of are those new special
>> inst-vars in Pharo (having trouble remembering the name, "slots?") to
>> define all sorts of RDBMS-style checks, etc.  I would rather do that
>> simply via the same few Smalltalk concepts as everything else.
>> Instantiation, setting state, and message-sending..
>
> Slots [1] are just ("just") instance variables promoted to first class
> citizens. They do for instance variables what Metaclass does for Class
> - they extend Smalltalk's metaobject protocol [2] to cover instance
> variables. This lets you intercept reads and writes to the instance
> variables, and all sorts of interesting stuff. It's still just
> standard Smalltalk.
>
> Seems like a perfectly sensible thing to do.

Pharo integrated this didn't they?  Is anyone using it?

> [1] http://hal.inria.fr/docs/00/64/17/16/PDF/Verw11b-OOSPLA11-FlexibleObjectLayouts.pdf
>
> [2] https://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol,
> praised by Alan Kay in his OOPSLA 1997 speech as (something like) "the
> best book written in 10 years.. but why did they have to write it in
> Lisp?"

Reply | Threaded
Open this post in threaded view
|

Re: Slots (was Re: Test expectation language (was Re: [squeak-dev] The Inbox: CollectionsTests-dtl.209.mcz))

Sean P. DeNigris
Administrator
Chris Muller-4 wrote
Pharo integrated this didn't they?  Is anyone using it?
Yes it is part of 3.0. I have been dreaming about what Magritte would look like w/ slots but haven't gotten around to writing code yet...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Slots (was Re: Test expectation language (was Re: [squeak-dev] The Inbox: CollectionsTests-dtl.209.mcz))

Frank Shearar-3
On 21 January 2014 02:05, Sean P. DeNigris <[hidden email]> wrote:
> Chris Muller-4 wrote
>> Pharo integrated this didn't they?  Is anyone using it?
>
> Yes it is part of 3.0. I have been dreaming about what Magritte would look
> like w/ slots but haven't gotten around to writing code yet...

I think the real answer will only come later, when application
developers start using Pharo 3.0.

frank