Hipreme's #4 Tip of the day - Don't use package.d
Adam D Ruppe
destructionator at gmail.com
Fri Nov 4 19:49:40 UTC 2022
On Friday, 4 November 2022 at 19:34:58 UTC, jmh530 wrote:
> Oh really, then what's the point of package.d?
It was originally added because Phobos had `std.algorithm` and
`std.datetime` and some people wanted to break them up into
pieces, but not break user code that still said `import
std.algorithm` instead of `import std.algorithm.sorting` (or
whatever).
One alternative was to call the new things like
`std.algorithm_parts.sorted` but this name a little ugly and
people would be less likely to transition to it.
The failure of this scheme though is that the package.d design is
braindead and broke things anyway as people updated and it
brought about other various bugs down the line. It was possible
to do it well but it wasn't.
More information about the Digitalmars-d-learn
mailing list