Hello Andrew,

after reading through your proposal I found some things that don't seem quite right.

While I can understand the need of a garbage collector in some use cases, the one featured in the proposal is one of the less convincing examples.
The code is generating a lot of objects that are not needed anywhere just to throw them away some time later.
For me, this is an anti-pattern.

Using a Dungeon class as owner for the rooms of the Dungeon, rather than just defining ownership by the room self-referencing each other, you can implement your example with an recursive approach:
http://coliru.stacked-crooked.com/a/3e5887dd4686e09b
There is still a lot to optimize, but I don't see the need for gc.

Regards,
 Simon

P.S.
1. Your main-function uses 'uniform_real_distribution' instead of  'uniform_int_distribution'. This won't compile for size_t.
2. You are initializing the Mersenne-Twister generators with 'std::mt19937 gen(std::random_device{});' which should be 'std::mt19937 gen(std::random_device{}());' (parenthesis)



Am Fr., 17. Mai 2019 um 11:26 Uhr schrieb Andrew Tomazos via Std-Proposals <std-proposals@lists.isocpp.org>:
Oops, this was supposed to go to std-proposals@lists.isocpp.org not std-proposals@isocpp.org

---------- Forwarded message ---------
From: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Wed, May 15, 2019 at 9:20 PM
Subject: Proposal of Handles (draft 2)
To: <std-proposals@isocpp.org>


Please find attached a working draft of:

     Proposal of Handles

Feedback appreciated.

Regards,
Andrew.

--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
http://lists.isocpp.org/mailman/listinfo.cgi/std-proposals