[squeak-dev] Re: talk on Newspeak online

Klaus D. Witzel klaus.witzel at cobss.com
Wed May 7 10:02:11 UTC 2008


On Wed, 07 May 2008 10:22:46 +0200, Igor Stasenko wrote:

> I read Gilad's blog and having some concepts which i think is
> redundant and smell like javaisms.

;)

> For instance, i don't share the view, that all fields in class
> instance should be initialized and initialized once, by constructor
> (instance factory method).
> What about lazy initialization?

Lazy in the sense of, a) initialize them with nil [in the constructor]  
then later b) assign them anything else? That's always possible, isn't it.  
I don't see much a problem here, except the *cause* of such language  
design decision. The latter is concerned with 1) modularity-ness of each  
and every constituent 2) non-staticness of each and every constituent and  
3) mixin-able-ness of every class (aka behavior-bearing object). To  
highlight just one problem in this >= 3 dimension time-space, which AFAICT  
is not solved yet (or perhaps just not published yet) in Newspeak: its  
*constructor* selector (the symbol) is for sure a *static* symbol  
constituent, violating non-staticness desideratum ... that is to say, even  
in a very-highly modularized Newspeak system you have to know the  
constructor message name of the things you import/mixin so, what about  
when they are changed behind your back ? (in a library you use, for  
example)

...
> Declaring private/public fields looking redundant too: they should be
> always private.

Except when you do not want to disappoint the zillions of flies around  
you? (who, by "law of gravity", cannot err ...)

> Instead, accessors #foo, #foo: can be made public or private by the will.
> But if you make field public, then it's accessors became public as
> well? But what if i want #foo to be public, but #foo: to be private?

This is not a valid question for obtaining a Certified Javanese credit!  
You failed ! ;)

/Klaus

>





More information about the Squeak-dev mailing list