Fear and loathing of the "perification" of Smalltalk

Peter William Lount peter at smalltalk.org
Thu Sep 13 08:04:26 UTC 2007


Paolo Bonzini wrote:
>> What does the Squeak Compiler convert curly braced code into?
>
> Sending #new: and #at:put:
>
>> Certainly in another version of Smalltalk there will be two 
>> evaluators: one that returns the value of the last statement as 
>> normal, plus one that stores the results of each statement as it's 
>> evaluated into a collection.
>
> You don't know what you're speaking about.  Ergo, you're a troll.
>
> Paolo
>

Hi Paolo,

Eh? What? You're calling me a troll? If that's the case that's just 
silly and very inappropriate since you are deeply mistaken. You know me 
Paolo, we've had interactions over the years, and I'm quite surprised 
that you'd stoop to person an hominem attacks by calling me a troll. 
Besides I don't follow the logic of how on earth you could interpret 
what I wrote in the series of postings under the subject 'Fear and 
loathing of the "perification" of Smalltalk'.

Maybe you didn't understand what I meant. If that's the case I apologize 
for your misunderstanding as my posting mustn't have been clear - I'll 
attempt to communicate what I meant again.

------
Two Evaluators For Smalltalk Like Languages
1) You'd have to agree that the normal Smalltalk evaluator simply 
returns the object from the last statement in a sequence of statements? 
Right? For example, the value of the following block is the value of 
"c", whatever that is: "[ a. b. c ] value". Let's assume that the 
variables are defined in the method or are instance variables.

2) You'd have to agree that it would be possible for a NEW evaluator to 
return a collection containing the values of ALL the statements in a 
sequence of statements? Right? For example, the value of the following 
block is the collection with elements "#(a b c)": "[ a. b. c] values". 
Note that the message "values" and not "value" was sent to the block. 
The "values" message asks the block to evaluate itself "collecting" up 
the objects from each statement and place them into a collection; by 
default an ordered collection would be a good choice since the number of 
objects wouldn't be known at run time.

So, assuming that you understood the two above paragraphs then you'd 
have to agree that (2) is a valid option or alternative to (1). As such 
you'd have to agree that I do know what I'm talking about, since it's 
clearly explained in the above two paragraphs. Simply put Blocks can do 
the job that curly braces do leaving curly braces out of Smalltalk 
syntax and available for a far better purpose.

While I now recall someone telling me that squeak did implement the 
curly braces as a quick compiler hack a couple years back (that just 
generates other Smalltalk code like a macro would in many other 
languages), I'd forgotten that during the recent conversations until 
reminded about it. That was my failing for sure, but not a significant 
one and certainly one that's not relevant to the fact that the second 
option for the existing evaluator would be valid and useful in Smalltalk 
or a language inspired by Smalltalk such as ZokuScript.

The other version of Smalltalk that I was referring to is the one that 
I'm working on, ZokuTalk and the language inspired by Smalltalk, 
ZokuScript. ZokuTalk is intended to be as close as possible to 
Smalltalk-80 style languages such as Cincom Smalltalk, IBM VisualAge or 
Squeak Smalltalk; that's to support code portability. ZokuScript is 
meant to take Smalltalk to a whole new level. ZokuTalk will be rewritten 
into ZokuScript on the fly at compile time or at runtime and then that 
ZokuScript will be compiled into native code. No byte codes to mess 
things up.*
------
*
So Paolo, maybe you'd have to admit that there could possibly be a 
chance that I might know what I'm talking about. The next time before 
you accuse someone of being a troll - which is a highly aggressive ad 
hominem personal attack and an attempt to stifle free speech and the 
discussion - you'd have the courtesy of asking what the person meant so 
that they can explain it to you. Just because you don't understand 
something that someone says doesn't mean that they are a troll with some 
devious purpose that you imagine. Also, because someone doesn't hold 
your point of view that doesn't mean that they are a troll either - it 
just means that they have a different point of view.

I hope that I've shown with the above two paragraphs that an alternative 
evaluator for Smalltalk added to blocks can be in fact made to work at 
the language level. How to implement it is certainly a question. I 
simply don't think that implementing it with curly braces is the way to 
go since that adds, in my view, unnecessary syntax when we could use 
Blocks with a second "collecting" evaluator for the statements. There 
are many smart implementors in this list and elsewhere who can figure 
out the best way to implement blocks in this manner.

All the best,

Peter William Lount
peter at smalltalk.org






More information about the Squeak-dev mailing list