[phobos] D2's std.exception
Jonathan M Davis
jmdavisProg at gmx.com
Thu Mar 17 20:57:35 PDT 2011
On Thursday 17 March 2011 16:35:30 Jonathan M Davis wrote:
> On Thursday, March 17, 2011 16:15:46 Walter Bright wrote:
> > Looking over it, the old license needs to be removed.
> >
> > The documentation for enforce() should clearly state that it is not to be
> > used for bug detection (use contracts and asserts instead).
>
> Pull request #12 on Phobos ( https://github.com/D-Programming-
> Language/phobos/pull/12 ) fixes the license, and I think that it tweaks
> enforces documentation ,but it doesn't try and make it clear about it not
> being for bug detection. But considering that that is a really an issue of
> exceptions vs assertions, rather than really an issue of enforce vs
> assert, I'm not sure how much changing the documentation would help. But
> then again, I do have a clear distinction betwen exceptions and assertions
> in my mind and understand what enforce is doing, so maybe adding something
> to enforce's documentation would help.
I committed a change to the pull request with a change to enforce's
documentation to mention that it's intended to aid in error handling, not
verifying the logic of programs.
- Jonathan M Davis
More information about the phobos
mailing list