[squeak-dev] The Trunk: Compiler-eem.480.mcz
Eliot Miranda
eliot.miranda at gmail.com
Thu Nov 24 19:23:52 UTC 2022
Hi Tobi,
let me try again (https://youtu.be/Cj8n4MfhjUc)…
> On Nov 23, 2022, at 12:23 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
> Yet, nil is only seldom a good domain object.
Precisely. Being disjoint from any domain it is the ideal “I am not a domain object” marker. So when one wants a variable to range over a domain and the singleton “not a member of the domain” nil is a great choice. And that’s exactly how I use it below.
There is another excellent marker of a non-domain object, and that is a newly instantiated object. That object is known to not be any other object, since objects are unique. So if code is searching for something (eg applying a block to every literal in the system), having the newly instantiated object that implements the search use itself as the “I’m not in the domain of all pre-existing objects” is a sensible choice. This is the pattern InstructionStream uses when scanning for selectors.
> -t
>
>> On 23. Nov 2022, at 19:34, tim Rowledge <tim at rowledge.org> wrote:
>>
>> I won't quote it all again but what Eliot wrote is important. There are good solid reasons why Smalltalk has a rigorously defined UndefinedObject. We demand rigorously defined areas of doubt and uncertainty!
>>
>> tim
_,,,^..^,,,_ (phone)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20221124/a09b2150/attachment.html>
More information about the Squeak-dev
mailing list
|