[squeak-dev] Re: talk on Newspeak online

Igor Stasenko siguctua at gmail.com
Thu May 8 10:30:54 UTC 2008


2008/5/8 Klaus D. Witzel <klaus.witzel at cobss.com>:
> On Thu, 08 May 2008 00:17:07 +0200, Vassili Bykov wrote:
>
>
> > I have considerable experience programming in both Smalltalk and
> > Newspeak, and (despite my email address) I'll say that Newspeak is an
> > improvement in a number of aspects. That includes constructors.
> >
> > The knee-jerk reaction of "X is crap because $(language_name) which
> > has X is crap" can prevent you from seeing the nature of the issue.
> >
>
>  Vassili, this is squeak-dev list here, in which nobody would ever call a
> language which based on Smalltalk (and Self) as being *crap*.
>

C++ is crap, Java is crap, anyone wants to argue?
And borrowing crappy concept from crappy language produces crap.
Crap, despite how good it looks like outside (syntax sugar) still
stays crap inside. ;)
More about this at the end of message.

>  We [yes, I think: we] all admire the tremedous work you folks are doing
> with developing Newspeak on the Squeak platform. I know many of us who can't
> wait to get a full copy of Newspeak on their notebook, same for myself (if
> only to browse for the first time in life a *very*high*modular*
> messaged-based Smalltalk-rooted system ;-)
>

I'm looking forward to see Newspeak on my box.
But my primary concern is not language problems (and what tricks
authors made to get around them), but paths taken to meet goals of:
- modularity
- locality
- security
- reflectivity
- flexibility of kernel/libraries.


>  AFAICT Igor is concerned about reduncancy and stiffness with particular
> language design decisions, on Newspeak constituents which he is used to
> implement himself in Smalltalk, on the fly and in such a way that it befits
> his actual project and not the language designer.
>

Right. One more point: What about metaprogramming?

Does anyone finds following pattern as bad style of programming? :

MyExternalModule>>new
   Smalltalk platformName = 'Windoze' ifTrue: [ ^ MyWin32ExternalModule new ].
   Smalltalk platformName = 'Mac' ifTrue: [ ^ MyMacExternalModule new ].
   Smalltalk platformName = 'foo' ifTrue: [ ^ MyfooExternalModule new ].
self error: 'Unsupported platform'.

The users of class does not care about subclasses and calling uniform
MyExternalModule>>new which returning a proper instance for working on
current platform.
Interesting, how above looks in Newspeak?

Also, how about creating anonymous instance factories (also known as
classes) on the fly?

AnonClassFactory>> x: aX y: aY
  | newClass |
newClass := ClassBuilder new
		newSubclassOf: self
		type: self typeOfClass
		instanceVariables: ''
		from: nil.
^ newClass new x: aX y: aY

And finally, who told that, ultimately, only classes can create instances?
Its interesting, in what way something like Prototype package can be
implemented in NewSpeak?

Personally, i see that constructors putting flaws in message-oriented
principles of NewSpeak.
They shifting responsibility of message handling from developer's
hands to compiler's hands and introducing unnecessary constrains
forcing future developers to invent schemes how to avoid/sidestep
them.


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list