[squeak-dev] Re: talk on Newspeak online
smalltalkbigot at gmail.com
Sun May 11 16:50:45 UTC 2008
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
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
> 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.
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.
> 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.
More information about the Squeak-dev