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