OSNews article about C++09 degenerates into C++ vs. D discussion

Steve Horne stephenwantshornenospam100 at aol.com
Fri Nov 24 20:31:07 PST 2006


On Wed, 22 Nov 2006 19:07:59 -0800, Sean Kelly <sean at f4.ca> wrote:


>> No? Hypothetical: your boss dumps a million lines of D code in your lap and says,
>> "Verify that this avoids the GC in all possible circumstances". What do you do?
>> What do you grep for? What tests do you run?
>
>I'd probably begin by hooking the GC collection routine and dumping data 
>on what was being cleaned up non-deterministically.

1.  If possible, relink without the GC library. If that fails, it
    doesn't necessarily mean the GC gets used, so relink with
    the GC library patched so that any attempt to allocate memory from
    the GC heap fails with a loud noise.

2.  Run all unit tests, and check that full coverage is achieved.

Of course that assumes that there *are* unit tests...

-- 
Remove 'wants' and 'nospam' from e-mail.



More information about the Digitalmars-d mailing list