[Newbie] Dolphin Smalltalk Tutorial

Dan Ingalls Dan.Ingalls at disney.com
Wed Apr 19 16:05:30 UTC 2000


>> It's not clear whether "you" here refers to the original poster, or to me.
>> Perhaps the original poster _did_ try "reverse<Cmd-Shift-W>" and was
>> confused by the fact that "FlippyArray2" does contain a 'reverse' method,
>> as do quite a number of classes, sometimes meaning "reverse order" and
>> sometimes meaning "opposite colour".

>Yep, actually this is what happened.  It was more confusing in that I was looking
>for something to do with the class String - so from my beginners point of view
>the reversed in OrderedCollection wasn't an immediate match.
>Thank goodness that the OrederedCollection actually had an example of reversed which
>clued me into the similiarity.  Otherwise the Newbie must try to decipher
>from the description or code what is going on.

Richard and Michael -

Yes, it is certainly confusing to have reverse also mean XOR graphics mode -- this goes back a long way.  It's why we used to start over every two years.  Alan had a metaphor for the constant need for a clean start -- "Let's burn the diskpacks!" he would say (sometimes just when things were getting good ;-).  I think anyone would agree that Squeak is ready for another such cleansing.  We're just hoping we can hold this off until a few other aspects of the next "balanced whole" are clear.

Also I can see how it's not immediately clear to a newbie that finding the right method in SequenceableCollection has anything to do with Strings.  We were stumped about this one for years, until Ted put the example mode into the method finder.  If you think to type
	'abc'. 'cba'
in the top pane of the method finder, you get exactly what you are looking for(*).  It just doesn't get any better.

	- Dan

PS:  (*) I accidentally noticed a charming piece of cosmic symmetry in this example:  It turns out that about one out of eight times you make this query, the method finder will also offer 'abc' shuffled as a candidate solution.  It's true, of course, 'abc' shuffled does produce 'cba' -- about one time out of eight!

PPS:  I also noticed that the browser-spawning feature does not work fully when there is only one item in the solutions list.  I will put out a fix for this anon.






More information about the Squeak-dev mailing list