I am learning Pharo and I want to understand if classes/objects like nil which belongs to UndifnedObject class have only 1 instance and act like a singleton, or is a new instance made every time we have a nil.
Do classes like UndefinedObject behave like a singleton in Pharo
The symbol nil
refers to the single instance of UndefinedObject
. You will find the same for true
and false
(sole instances of True
and False
respectively).
Thank you, I also wondered about true and false and you answered that as well. –
Docilla
© 2022 - 2024 — McMap. All rights reserved.