Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Standard libraries shouldn't include "leaf" modules, but probably should include interface / adapter modules. So no to JSON, but maybe yes to a serde interface. No to a database driver, but maybe yes to an interface like JDBC.

Without common interfaces, flexibility in implementation is much more expensive, and innovation suffers too, as new things are harder to get off the ground without existing code that they can cheaply plug into.



There's an argument to be made for having basic so-called leaf modules in the standard library. That is it makes it far simpler to get a basic installation of C++ and start doing cool things with it. Experienced developers or people that need domain specific features would be using their own specialised libraries anyway.

So instead of trying to figure out which one of the dozens of GUI frameworks to use in making a window and have it change colour, you just write it using the standard library. You want to do a HTTP request, then there will be code in the standard library for that.

It will also save work trying to figure out which third party library to use when you want to do these things locally on a small test project.


> So instead of trying to figure out which one of the dozens of GUI frameworks to use in making a window and have it change colour, you just write it using the standard library.

Congrats, now you're stuck with something like Xwindows or MFC or AWT.


They're standard for the OS but not a standard for the programming language library.

Granted AWT wasn't great but you could still make a GUI with it straight out of the box. It allowed you to make windows and buttons and start exploring the programming language.

Like I said having a standard library option won't eliminate third party libraries, it will just provide something in the box for people to start using straight away.


Which while not ideal, are guaranteed to be present, contrary to third party libs.


That assertion is disingenuous at best.

That guarantee is only achievable at the expense of forcing compiler developers to maintain a GUI toolkig for all platforms. Who in their right mind believes that's reasonable or desirable?


Everyone that wants a language to thrive instead of dealing with thousand incompatible implementations.

Many C++ targets don't support IO or networking, so lets not burden embedded compiler developers with standard library bloat.


So instead of a GUI library what about a HTTP or a network library as part of the standard? Surely handling TCP and UDP connections is an order of magnitude easier to implement and maintain.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: