[squeak-dev] FormInspector, or also: Text>>#= and its consequences

tim Rowledge tim at rowledge.org
Wed Jan 11 19:10:20 UTC 2023



> On 2023-01-11, at 10:14 AM, karl ramberg <karlramberg at gmail.com> wrote:
> 
> Tangential to comparison is also the morphic copy methods.
> What do we mean when we copy a complex object? 
> 

..and...


> On Wed, Jan 11, 2023 at 5:40 PM Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 
> Equality is tricky. A given definition must be useful “in a general context” (hand waving I know), and must match #hash, and must be reasonably efficient to be usable.  All that implies that in non-trivial implements a good comment should be written :-)

These are important points that also impact old favourites like hashing. For copying we have delights such as deepCopy, veryDeepCopy, veryVeryDeepCopy and so forth. For comparison we have convoluted tests that confuse almost everyone in later days.

My suggestion for a flexible, self-documenting, and hopefully intelligible way of handling these cases is to be more explicit.
Don't implement #= if what you actually mean is #isEquivalentInCaseOfEditingMorphStructureTo: .
Provide #copyMyComplicatedThingForSavingToSIXXStream instead of misappropriating #copy.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- An 8086 in a StrongARM environment.




More information about the Squeak-dev mailing list