Support of algebraic operations on sets
Blake
blake at kingdomrpg.com
Fri Jun 15 19:48:11 UTC 2007
On Fri, 15 Jun 2007 10:23:56 -0700, sig <siguctua at gmail.com> wrote:
>> > Or remove them from second book.
>>
>> new do: [:k | book2 removeKey: k].
>>
> instead of:
> book2 difference: (book1 intersection: book2)
>
> can't you see the difference?
Hmmm. In algebra:
2+2*4 = 10
In Smalltalk:
2+2*4 = 16
Not to belabor the point, but Smalltalk isn't math or algebra. It does
have its own internal consistency ("purity", some might say), though, and
it's not reasonable to expect to conform to those of another discipline.
To my mind Smalltalk is more like, well, talking than math. Which is why
the above equation makes sense to me: ("Add two and two
together...multiply by four...."). Messages above all, right?
Smalltalk's vocabulary has value because it is well defined and has been
well defined for a long time. It's not hard to create a new class that
does what you expect; are you suggesting that decades of code and
documentation be broken because this interpretation of "difference"--which
is exactly what I would expect if someone said, "tell me the difference
between this dictionary and that one"--is somehow offensive to you on
mathematical grounds?
More information about the Squeak-dev
mailing list
|