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?" |
>>> 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?" |
Administrator
|
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 |
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 |
Free forum by Nabble | Edit this page |