On 2010-10-06 12:34:54 -0400, Andrei Alexandrescu <[email protected]> said:

2. It would force certain types (such as BigInt) that allocate resources and have value semantics to resort to reference counting.

Also, before asking for more reference counting, perhaps you should check that bug and find a nice way to do reference counting correctly with no race conditions (unlike what's done in Phobos currently).
<http://d.puremagic.com/issues/show_bug.cgi?id=4624>

The most problematic thing with reference-counted memory is that the GC can call your struct's destructor from any thread which can cause low-level races if the reference counter isn't manipulated with atomic operations. And atomic operations slow things down, are you sure you want to force this in BigInt?

--
Michel Fortin
[email protected]
http://michelf.com/

Reply via email to