new Smalltalk programmer's thoughts

Bill Spight bspight at pacbell.net
Sat May 6 14:08:03 UTC 2006


Dear Wolfgang,


> So the changes *are* important.
> 
> And hard to implement in Smalltalk.
> 
How have you tried to implement them? Have you used the debugger? Squeak
has some surprises on a low level, but you might only have to make a few
simple changes to produce a dialect of Squeak that indexes from 0
instead of 1. Also, as has been suggested, you can create a class of
zero-based arrays. 


> Or, viewed as biological species, Squeak and even Smalltalk-80 evolved
> to a 
> level where they lost the flexibility to meet the "new" challenge of
> switching 
> from the dark art of medieval metaphors to the scientific technique of
> logical 
> reasoning.

Isn't flexibility a hallmark of Smalltalk and Squeak?

And we are not talking about logical reasoning. Consider the spatial
metaphor of stacking blocks on top of each other. (For convenience I am
going to use the right direction for up.)

     | Bloc | Block | Block | ...

Here is a natural numbering for the blocks.

     | Block1 | Block2 | Block3 | ...

(You can also count top down.) Nothing illogical about that.

Now let's index the space.

     |0 Block |1 Block |2 Block |3 ...

It is natural to make the ground the origin for the up-down axis, and
give it a value of 0. Nothing illogical about that, either. Furthermore,
for more complex spatial relationships, it is convenient to have a 0. It
can simplify expressions and calculations. It may also be convenient to
identify the block on the ground as Block0, and go from there. That is
what you consider logical, but it is only one possibility.

How you assign numerals to things is a matter of convention and
convenience, not logic. A lot depends upon the domain of application.
For that reason you really want the flexibility to number collections as
you see fit. Doesn't Squeak offer that flexibility?

(I am not used to Squeak, myself, but I have some experience with an
earlier Smalltalk.)

Best wishes,

Bill




More information about the Squeak-dev mailing list