Improving assert-printing in DMD
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 1 20:44:14 PDT 2015
On Friday, 2 October 2015 at 00:33:13 UTC, David Nadlinger wrote:
> On Friday, 2 October 2015 at 00:25:18 UTC, jmh530 wrote:
>> Wouldn't that mean that every file that uses unit tests would
>> have to import std.assert or something? So pretty much every
>> file would be importing it anyway.
>
> It could, for example, still be in object.
Yeah. We already have that with several symbols (e.g. size_t and
string), and arguably we should do it with a few others (like the
range primitives for arrays). So, if we'd made new and assert
into library functions instead of built-ins like we arguably
should have been, then they'd probably be in object.d, but that
shipped has long since sailed.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list