enforce()?

Sean Kelly sean at invisibleduck.org
Tue Jun 22 09:05:37 PDT 2010


"Simen kjaeraas" <simen.kjaras at gmail.com> wrote:
> BCS <none at anon.com> wrote:
>>> I think that for such situations you should ship a debug and release
>>> version of the DLL.
>>> This way you don't sacrifice performance when the user doesn't want
> > > to
>>> be
>>> held by the hand.
>> 
>> Until you can show me a perf problem, I don't see any point in doing 
> > > that. (OTOH, deep structure validation, or anything else slower
> > > than  > O(1), is another thing all together)
> 
> Also, if you do have two different versions, I'll bet you ready money
> someone will program only the release version, because "that's the
> version the users will have", "the debug version is slow" or whatever
> other inane excuse their minds are capable of coming up with.

What I've done with druntime is build checked and unchecked versions.  I
don't think it makes sense to ship a debug version of a library because
that's for debugging the library, not user code. I'll admit that I like
having debug symbols in place though, just not the debug tests
themselves. It's occasionally nice to not have a trace vanish just
because it passes through library code.


More information about the Digitalmars-d mailing list