Antwort: Mixed feelings
Ned Konz
ned at bike-nomad.com
Fri Jun 7 17:20:44 UTC 2002
On Friday 07 June 2002 09:40 am, Kamil Kukura wrote:
> Boris_Gaertner at msg.de wrote:
> That's clear, but that design. Having class LargeInteger and then
> two subclasses of it (positive and negative integer) makes more
> sense to me.
My impression of Smalltalk idioms is that inheritance is sometimes
used merely as an optimization that allows classes to share code.
It's pointless to worry about the "proper" inheritance structure for
numbers as long as they all respond correctly to the proper
protocols. In other words, we have other ways of expressing the "is
a" relationship than just inheritance.
> > >>Would it be possible to extend language so it could be
> > >>written as something like #perform:*with:?
> >
> > I failed to fully understand this question.
>
> I know what is #perform: I just meant to have written -
>
> perform: aSymbol *with: #(firstObject, secondObject, thirdObject)
>
> instad of perform: aSymbol with: firstObject with: secondObject
> with: thirdObject
What's wrong with:
perform: aSymbol withArguments: { firstObject . secondObject .
thirdObject }
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|