Lars T. Kyllingstad wrote:
On Sun, 27 Jun 2010 18:09:02 -0500, Andrei Alexandrescu wrote:

On 06/17/2010 04:10 AM, Lars T. Kyllingstad wrote:
On Wed, 16 Jun 2010 07:31:39 -0700, Andrei Alexandrescu wrote:

Michel Fortin wrote:
On 2010-06-16 05:15:24 -0400, Walter Bright
<newshou...@digitalmars.com>  said:

The difference is not based on those 3 points, but on what Andrei
wrote here. Contracts and error checking are completely distinct
activities and should not be conflated.
True.

Yet, enforce is inside std.contracts. If that isn't conflating the
two concepts I wonder what it is. :-)
You're right! I think Lars' suggestion is sensible - we should move
enforce to object. Better yet we should find a better name for
std.contracts. Ideas?

Andrei

A few suggestions (even though I still think it belongs in object.d),
in no particular order:

std.enforce
std.assumptions
std.constraints
std.checks
std.tests
std.error
std.errcheck

-Lars
We haven't reached consensus on where to put enforce() and friends. Any
other ideas? Of the above, I like std.checks.

Better yet, how about defining std.exception that includes a host of
exception-related functionality (such as defining exceptions that retain
file and line, perhaps stack traces etc.)?


TDPL mentions several times that enforce() is in std.contracts. Doesn't that preclude moving it or renaming the module?

I plan to move it to std.exception in a backward-compatible way (have std.conv consist of only one import, then deprecate it).

Andrei

Reply via email to