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

%u hal at nospam.gmail.com
Sun Nov 26 19:29:23 PST 2006


>>> 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...


It should be as simple as choosing a compile option
and letting the compiler complain the use of GC.



More information about the Digitalmars-d mailing list