Fwd: [squeak-dev] Re: Ideas about sets and dictionaries

Igor Stasenko siguctua at gmail.com
Thu Nov 12 04:07:52 UTC 2009


2009/11/12 Randal L. Schwartz <merlyn at stonehenge.com>:
>>>>>> "Igor" == Igor Stasenko <siguctua at gmail.com> writes:
>
> Igor> But your solution could be described as:
> Igor> a) we having a basket full of differently colored balls.
> Igor> b) while counting balls in basket lets count all balls, except
> Igor> transparent ones.
> Igor> ..and your idea:
> Igor> rewrite b:  while counting balls in basket lets count all balls,
> Igor> except red ones.
>
> No, it *does* solve the problem, because "red" is very very very local
> to this set.
>
It is, and inspector will show us this very very very local object , and
#instVarAt: as well as #someInstance and #allInstances and many others
(debugger, OODBs etc).
Then at some point it could become not so very very very local, and
then you will meet the same problem
as we currently having with inability to have a nils in Set.

> The only problem would be if you have a set add itself's instance vars.  And
> that would be problematic for other issues.
>
> But it would always be able to represent *every* other set in the image.
>

indeed, that's why i don't like it and treat it similar to current
implementation without strong reasons why we would
want to employ it.

A simple illustration:

 set := Set new.
 Object allInstancesDo: [:obj | set add: obj ]   "using 'Object new'
as filler, right?"

we could argue very long why one would want to do that, but the fact
is clear: your proposal have nothing
to offer to developer how to get around that.



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list