On Wednesday, March 21, 2018 09:45:46 Russel Winder via Digitalmars-d wrote:
> D has the Dub repository, so why is Phobos being "batteries included" even
> an issue now?

Some folks seem to think that something _has_ to be in the standard library,
or the language is sub-standard, and some folks just want things to be in
the standard library. So, it still comes up in conversations from time to
time that X or Y should be in Phobos, but since folks aren't writing such
modules and then attempting to get them into Phobos, it's largely a moot
issue at the moment.

Also, as code.dlang.org has become more prevalent, attempts to get new
modules into Phobos have mostly disappeared.

Once I feel that dxml is ready, I'll probably try and get it into Phobos to
replace std.xml, but the only reason that I intend to do that is because
std.xml is not considered to be up to Phobos standards, and we've wanted to
replace it for years now. If there were no XML module in Phobos, I wouldn't
propose one. It doesn't necessarily hurt to have such a thing in Phobos, but
it's far from necessary.

I suspect that the main reason that we haven't seen more attempts to get
stuff into Phobos is that folks simply don't want to go through the Phobos
review process, and because they can now easily make it available on
code.dlang.org, there's a lot less incentive to try and get it into Phobos
just to make it available to others. I think that at this point, the main
advantage to having something in Phobos relates to vetting.

Any major functionality that has gone into Phobos has been reviewed by some
of the core D developers. How thoroughly it's reviewed varies, and there's
some risk of a new addition winning a vote, because folks want the
functionality, so they vote yes, but they didn't take the time to actually
review the code, but it has gotten _some_ review, which most code on
code.dlang.org has not, and in general, the stuff that goes through the
Phobos review process has been pretty thoroughly reviewed. So, the code
quality has a stamp of approval on it that stuff on code.dlang.org doesn't
have, and by something being the "official" implementation, in principle,
you can rely on it being good for the majority of use cases and generally
being a well-designed, solid solution. If the standard library has a
solution for your problem, then you can just use that and don't have to go
looking elsewhere unless you later find that something about your program
makes it so that Phobos' solution isn't going to work for you, whereas if
there's no solution in Phobos, you'll have to go digging for stuff on
code.dlang.org and spend the time to evaluate each possible solution.

So, from that perspective, there's some value in having something in Phobos
instead of on code.dlang.org. Ultimately, it doesn't scale. Even a
"batteries included" solution doesn't contain everything, and often enough,
there are enough ways to solve a problem that a "one size fits all" solution
isn't going to work, but you can get a lot of functionality in there as long
as we have the manpower and process to maintain it. However, it's
questionable that we have the manpower, and this thread was started
precisely because of concerns about the process.

And ultimately, I agree that there isn't that much stuff that needs to be in
Phobos. code.dlang.org fulfills the role just fine for most stuff, and as
improvements come to code.dlang.org, that will work better and better. What
ultimately gets into Phobos is going to largely depend on what gets proposed
for inclusion, and based on what's been happening, I suspect that the debate
is mostly going to take care of itself in that not much new stuff is going
to be proposed for inclusion in Phobos, meaning that discussions about stuff
that someone thinks should be in D's standard library are mostly going to be
complaints about something not being there that that particular person
thinks should be there and not actual discussions about whether a piece of
functionality that exists should go in there or not.

- Jonathan M Davis

Reply via email to