[squeak-dev] Re: talk on Newspeak online

Igor Stasenko siguctua at gmail.com
Wed May 7 16:21:19 UTC 2008


2008/5/7 Klaus D. Witzel <klaus.witzel at cobss.com>:
> On Wed, 07 May 2008 15:48:56 +0200, Igor Stasenko wrote:
>
> > >
> > >  ...
> > >
> >
> > To me it looks like people see a fallen tree across the road here.
> >
>
>  Hhm. what's that mean.
>
>
Means that people keep staring at it or starting building new road
instead of just jumping over and continue moving :)

>
> > I don't see much problem with smalltalk's approach. Proper
> > initialization will be always a concern of developer. There is no way
> > how we can ease his task with language sugars/semantics, because there
> > always can be cases, which don't fit to developer's plan of how things
> > needed to be initialized. So, the less we constrain him here - the
> > better.
> >
>
>  Unless a language designer puts inheritance into the developer's hands and
> promises that the language then still provides
> modularity+messaging+you_name_it (unlike Squeak/Smalltalk which doesn't
> implement anything related to modularity nor slots).
>

_Implement_ - exactly!. A modularity is related to implementation not
to language syntax - right?
I think smalltalk can be made modular very easily, by reviewing role
of globals and classes/metaclasses.
But smalltalk syntax don't need to be changed to support modularity.

>  I think that Newspeak language design is one approach, Squeak/Smalltalk
> implementation is another.
>
>
>
> > For instance: useful case - omit calling superclass initialization.
> >
>
>  Not possible in Newspeak, since by *naming* the superclass (at the
> "declarative" time of subclassing) in Newspeak one *must* also name super's
> constructor (the *static* symbol that I reflected upon in the above and
> again in the next sentence), or else accept the default one (#new); similiar
> to how it is in Javanese ;)
>

And similar to C++. But it is really needed time to time to have
different order of initialization, or do partial initialization.
Its not a point of good/bad design , its a point of simply allowing or
disallowing that.


>  FWIW, the superclass' slot name can be anything (message based, of course)
> but, the constructor's message selector is the *static* thing that user of a
> module has to know about ...
>

Hmm, can classes have multiple constructors? Or just #new if not
defined by developer and #myUberConstructor if defined?

> >
> > I don't see how message-driven design (which Newspeak claiming is)
> > should care about declaring state properties.
> > State in message-driven system is a behavioral component, not declarative
> one.
> >
>
>  Didn't understand a word :( what has *state* to do with a scope-bound
> privilege? Can you reformulate using a) global visibility of a slot v.s. b)
> ... v.s. c) ... v.s. x) local visibility of a slot. TIA.
>

Writing 'v.s' in java and other rudimentary languages tells compiler
to find a field with name 's' and check scope/visibility rules.

In message-based system, if i write 'object s' , error is possible
only at runtime, since compiler knows nothing about object: does it
having #s message? and what it does? does it private or public? Makes
no sense at all.

So, in message-based system you really can tell compiler to check the
caller context of message, and if caller context is wrong - generate
exception. And this is nothing to do with slots, its only applicable
to methods, because only messages we have, and messages computed by
methods.
Unless you put slot == method.


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list