what are guidelines for when to split a module into a package?
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Thu Feb 22 08:02:18 UTC 2018
On Wednesday, February 21, 2018 23:44:49 Timothee Cour via Digitalmars-d
wrote:
> > it's harder to find symbols
>
> i don't understand this argument.
>
> ```
> dscanner --declaration startsWith
> ./std/algorithm/searching.d(4105:6)
> ./std/algorithm/searching.d(4195:6)
> ./std/algorithm/searching.d(4265:6)
> ./std/algorithm/searching.d(4301:6)
> ```
I have no intention whatsoever of using dscanner. I can do something similar
with grep, but either way, that doesn't help anyone who's actually reading
the documentation and trying to find stuff that way, which is often what
people do.
Regardless, the more split up stuff is, the more places that you have to
look for it. We already have plenty of complaints about folks not knowing
whether something is in std.algorithm, std.array, std.range, and std.string
without getting into issues of sub-modules.
And I really don't understand why splitting up a module like std.array would
help anything except maybe import times, but that only matters if the module
is large (which std.array definitely isn't) and if you're importing the
modules as specifically as possible and not using public imports through
something like std.array.package.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list