On Saturday, 18 February 2017 at 22:48:53 UTC, Dmitry Olshansky wrote:
[...]
For some time I was a proponent of yanking stuff from Phobos into oblivion. Now I'm not. Stop breaking code. Yes, we should think harder before introducing libraries into Phobos but continuing on with removal of stuff just introduces the continuous churn for no adequate benefit.

What would anyone get from std.net.curl removal? Are you going to find all of D programs and patch them to use something else?

Yes, Phobos is full of historical accidents and cruft. I'm constantly tempted to propose Phobos v2 properly _designed_ (not *grown*) and without the junk. I really think it might be a good idea but only when we actually know what a proper design looks like.

Due to writing the AppStream metadata generator in D, which is an infrastructure piece of many Linux distributions, I have a fair bit of knowledge now about the problems people (especially newcomers who just want to scratch an itch and submit a quick patch) encounter when working with D code. The inconsistent standard library is - after compiler bugs - the biggest issue. Some people described Phobos as "PHP-esque" in terms of design, and I have to agree with them. Working with it is often unpleasant, and you can clearly see which parts of it were designed recently and which are "historical accidents".

Constantly shuffling stuff around in Phobos and adding/removing things will not solve the problem, it will just give newcomers a feeling of insecurity and make the language feel less mature. Stunningly, a lot of projects write their own primitives instead of using Phobos (Vibe, lots of dub modules just providing containers, just now another general purpose utility library was announced on the forums, ...) which is a clear sign that Phobos isn't seen to be sufficient.

I think investigating to build a "Phobos2" standard library would be a very good idea - make it opt-in for a while, and then set a flag-date and switch, so people will only need to adjust their code once to jump on the new version, and don't constantly need to play catch with Phobos API breaks and riddle their code with version() and static if instructions to be able to compile with multiple Phobos and LDC/GDC/DMD versions.

Cheers,
    Matthias

Reply via email to