Some Self ideas
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Thu Jan 18 04:17:26 UTC 2001
Diego Gomez Deck <DiegoGomezDeck at ConsultAr.com> suggested:
Object>>value
^ self
Please, don't anybody do this. It seems quite common for beginners,
used to other languages, to write
cond ifTrue: exp1 ifFalse: exp2
when they really mean
cond ifTrue: [exp1] ifFalse: [exp2].
The sooner this is rejected, the sooner they understand how ifTrue:ifFalse:
is supposed to work.
The other message is:
Object>>, anObject
^ OrderedCollection with:self with:anObject
IMHO, it is helpful if each message means one thing.
If "a , b" always means "make a new sequence with the elements of a followed
by the elements of b", I can cope. But if it means "make a new sequence
(either with a as an element or the elements of a as elements) followed by
the elements of b", I'll get lost. The more complicated the description
of a method, the harder it is to use.
More information about the Squeak-dev
mailing list
|