
On Wed, Dec 15, 2021 at 12:18 PM Chris Angelico <rosuav@gmail.com> wrote:
Sorry if this is a dumb question, but would it be possible to solve that last point with an immortal arena [1] from which immortal objects could be allocated? None/True/False could be allocated there, but so could anything that is more dynamic, if it's decided as important enough. It would still be possible to recognize them by pointer (since the immortal arena would be a specific block of memory).
That's an interesting idea. An immortal arena would certainly be one approach to investigate. However, I'm not convinced there is enough value to justify going out of our way to allow dynamically allocated objects to be immortal. Keep in mind that the concept of immortal objects would probably not be available outside the internal API, and, internally, any objects we want to be immortal will probably be statically allocated. -eric