[squeak-dev] Repeating pattern in system code: "process ifNotNil: [process terminate]"

mail at jaromir.net mail at jaromir.net
Fri Dec 17 19:14:06 UTC 2021


Hi all,

I have noticed this recurring theme in many system methods:

	process ifNotNil: [process terminate]

Correct me if I'm wrong but it looks to me as an ugly non-OO pattern which could be elegantly replaced with a simple:

	process terminate

if we implemented:

UndefinedObject >> #terminate
	"return nil"

Is this right or am I missing something?
Thanks,

~~~
^[^    Jaromir

Sent from Squeak Inbox Talk


More information about the Squeak-dev mailing list