new Smalltalk programmer's thoughts

Wolfgang Helbig helbig at Lehre.BA-Stuttgart.DE
Sat May 6 16:36:14 UTC 2006


Hi Bill,

thanks for your reply!

You asked:

>How have you tried to implement them?

Nope. I decided it is easier to implement the protocol of my class as expected
by the client, the Hobbes Emulator, than to implement a novice protocol and
to adapt the client to the new protocol. And this decision turned out
to be right -- after I learned to cope with the ranges of indexes and positions.
 
>Have you used the debugger?

No. I prefer logical reasoning. :-)

>Isn't flexibility a hallmark of Smalltalk and Squeak?

It is.

>And we are not talking about logical reasoning. Consider the spatial

Hmm? I intended to talk just about logical reasoning. And how some deep
design decisions regarding the range of indexes in sequenceable collections
and positionable streams made it hard for me to prove my implementation correct 
while writing it. That's all.

>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.

Your are right!

>
>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.

Again, you are right!

>for more complex spatial relationships, it is convenient to have a 0. It
>How you assign numerals to things is a matter of convention and
>convenience, not logic.

Right!

>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?

It sure does!

Greetings
Wolfgang

--
Weniger, aber besser.




More information about the Squeak-dev mailing list