[squeak-dev] Re: talk on Newspeak online

Igor Stasenko siguctua at gmail.com
Sun May 11 18:26:33 UTC 2008


2008/5/11 Vassili Bykov <smalltalkbigot at gmail.com>:
> On Fri, May 9, 2008 at 10:31 PM, Florin Mateoc <fmateoc at gmail.com> wrote:
>> I think you forgot the new kinds of literals introduced to support
>> namespaces, plus I suspect that you bear some responsibility for the
>> increase in complexity in VW as well :)
>
> I bear some responsibility for work in VW. Why work equals increased
> complexity is an interesting question, and besides organizational
> things it ties right into the concept of an image as a delivery
> artifact. Combine it with paying customers who expect their
> applications which depend on the last 15 years of the image genesis to
> keep working, and you have yourself a nice katamari ball which only
> knows how to grow.
>
>> Come on, you had just mentioned nested classes, isn't that a new concept?
>> And doesn't the label "Access modifiers" hide a collection of
>> concepts/features ?
>> And mixins, are they themselves classes or are they separate concepts from
>> classes?
>
> I didn't include nesting because it is a relationship rather than a
> core entity. It's not a biased exclusion--otherwise I'd have to
> include things like inheritance, importing of pool dictionaries by
> classes and a few other things.
>
> Access modifiers represent a single concept: acceptance policy of
> messages. Just like methods, classes and slots are accessed by sending
> messages (and *only* by sending messages). A public class/slot/method
> means its accessor message is accepted from any object. For a private
> construct, an accessor message is accepted only from the same object.
>
> A mixin is a primary concept. Classes and their inheritance are
> derivatives. A subclass is an application of a mixin to a superclass.
> Thus, a class in general is a chain of mixin applications beginning
> with nil.
>
>> And talking about global scope, e.g. Java doesn't have (an objectified)
>> global scope. So what do people do when they need it? They stick whatever
>> they need in a class, which is globally visible (I assume this is true even
>> in Newspeak), and access it indirectly. The only thing you "gained" is an
>> extra indirection.
>
> No, global visibility of classes is not true in Newspeak. Everything,
> and that means _everything_ is a message send. A module can only use
> library classes it retrieved by sending messages to a library instance
> passed as an initialization argument. I already illustrated it in the
> last message, but in case it got lost among other points:
>
> class MyApp usingLibrary: library = (
>  private Array = library Collections Array.
>  private Stream = library Streams Stream.
>  ...
>

Similar can be easily implemented in smalltalk.
As well as private/public symbol scoping.

I think more fair comparison would be not comparing
implementation-related concepts , but only languages.
Smalltalk is pretty obscure in this regard: it defines only message
sending syntax. blocks & methods and yes, assignment and instance
vars.
The rest is implementation specific.
Even a class 'definition' is nothing more than a message send:

ProtoObject subclass: #Object
	instanceVariableNames: ''
	classVariableNames: 'DependentsFields'
	poolDictionaries: ''
	category: 'Kernel-Objects'.

Can you say the same for NewSpeak?

Its only a question of implementing new method at class side to make a
'private' subclass whatever that may mean to users:

Object privateSubclass: #MyPrivateSubclass
...

> This is how MyApp learns "global" class names. Class names are just
> accessor methods in their containing class. Here, we assume that the
> library is subdivided into submodules such as Collections and Streams,
> so that we first retrieve one of those and then the class.
>

nothing prevents you to use implement similar concepts in smalltalk.

All you need (at least in Squeak) is to provide own implementation of
#bindingOf: method which sent to a class by compiler to resolve names
which not found in local scope, when method being compiled.
So, in smalltalk, it is a choice of implementor to introduce 'private'
symbols or other privileges in own, arbitrary way, not in the way how
other people see the meaning of private symbols.

>> Sure, global scope should not be abused. But it is damned convenient. Very
>> useful as a quick debugging aid.
>
> Nothing prevents you in Newspeak from having *a* scope somewhere to
> use as a debugging aid. Except that it will be your own private
> debugging aid scope nobody else will see or depend on.
>
>> Ah, you mentioned the "dirty image" curse word! Time for another rant:
>
> There was no such word in what I said. Images are extremely useful as
> development workplaces. But not as much as delivery tools. Most people
> who know what they are doing are taking care that their work is not
> dependent on *the* image. They set up a declarative scheme where a
> work image is built from a seed image and sources. Too bad that the
> "seed" in case of something like Squeak starts off with the world and
> a kitchen sink, and in case of VW it must keep alive the past 15 years
> of Smalltalk industry.
>
> Cheers,
>
> --Vassili
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list