Should every kernel class x provide support for (x new)
printString and (x new) hash
bert at freudenbergs.de
Sun Jan 21 20:23:54 UTC 2007
Am Jan 21, 2007 um 21:15 schrieb Ralph Johnson:
> On 1/21/07, Klaus D. Witzel <klaus.witzel at cobss.com> wrote:
>> Hi Ralph,
>> I have nothing to say against your arguments :) just asked if it is
>> possibile to be more polite to potential converts when they begin
>> using a
>> workspace :)
> Sure, it is good to be friendly.
> Perhaps change Collection>>do: to
> do: aBlock
> self class = Collection ifTrue: [self error: 'Collection is an
> abstract class. You should probably use OrderedCollection instead.'].
> self subclassResponsibility
That's an excellent idea!
Maybe we could even reword the notice in the general
subclassResponsibility method. In general, Squeak error messages are
quite unhelpful. Like, the first thing everyone encounters is a DNU
for nil - the message could be way more informative.
> Or maybe change #new to be
> self = Collection ifTrue: [^OrderedCollection new].
> ^super new
This one I do not like.
- Bert -
More information about the Squeak-dev