January 24, 2005 DBC, Phobos and Debugging | ||||
---|---|---|---|---|
| ||||
If one is supposed to have any use of DBC, shouldn't a debug version of Phobos exist ? Or am I supposed to build such a library, for my own use ? (certainly doable as well) Since the current phobos library is compiled with -release, it doesn't have *any* contracts. Which means that even with the -debug builds, contracts in the runtime library aren't checked. For instance, toStringz() args with NUL chars: > Error: AssertError Failure ../gcc/d/phobos/std/string.d(221) That error is only thrown when I link towards libphobos_debug.a, not the regular libphobos.a ? Which seems to contradict: > Class implementations should use DBC > This will prove that DBC (Contract Programming) is worthwhile. > Not only will it aid in debugging the class, but it will help every > class user use the class correctly. DBC in the class library will have > great leverage. http://www.digitalmars.com/d/phobos.html --anders BTW; Shouldn't it throw InException and OutException ? http://www.digitalmars.com/d/dbc.html Or maybe that is something just related to GDC... Just getting started with this Bertrand Meyer stuff. |
Copyright © 1999-2021 by the D Language Foundation