top | item 47074666

(no title)

ethin | 10 days ago

Oh here we go again, someone demanding networking (of all things) in the standard library. Are you next going to demand a GUI toolkit too? Maybe an entire game engine and Vulkan/WebGPU implementation too while we're at it? Just because other languages do it does not mean it is a wise idea for C++ to follow suit. I mean, do I really need to point you to std::regex as an example of what happens when we try to add extraneous, hard to define problems to the STL? Do you really want to add something way more complicated than a regular expression engine to C++ (networking), with all that entails? Because I certainly don't.

discuss

order

tialaramex|10 days ago

I'm not a C++ programmer, and so in a sense I don't care whether they get networking but

1: Some of networking is vocabulary and so it obviously should live in your stdlib, and indeed for C++ it should be in what they call "freestanding", like Rust's core, where core::net::IPv4Addr lives. It is very silly if the software in this cheap embedded device and this PC web browser can't even agree on what an IP address is in 2026.

2: In practice the C++ stdlib is used as a dumping ground for stuff that ought to live in a package manager if C++ was a good language. That was true when networking was first proposed and it's still true now. It's why RCU and Hive are both in C++ 26. Those aren't vocabulary, and they aren't needed by the vast majority of programmers, but their proponents wanted them to be available out of the box and in C++ that means they must live in the stdlib.

ethin|9 days ago

These concerns seem like OS level concerns. Networking primitives like IP addresses is probably a good idea. But anything more than that (like the GP is implying) is absurd to want in the stdlib.

tw1984|9 days ago

> someone demanding networking (of all things) in the standard library

> what happens when we try to add extraneous, hard to define problems to the STL? Do you really want to add something way more complicated than a regular expression engine to C++ (networking)

"they have millions justifications on why the stdlib doesn't need networking. but in the same time, some bureaucratic "committee members" struggling with their midlife crisis want you to waste your life on stuff like Std:Is_within_lifetime in the era of AI."

totally as expected.

> Are you next going to demand a GUI toolkit too? Maybe an entire game engine and Vulkan/WebGPU implementation too while we're at it

please keep such extremely stupid ideas to yourself, you are the only person here suggesting having GUI and WebGPU stuff in C++.

your entire skillset could be replaced by a 7B LLM model if you can't even tell the difference of networking & GUI for a general purpose language like C++.

swiftcoder|10 days ago

> someone demanding networking (of all things) in the standard library

Networking is defacto in the standard library, because C++ standard library is almost always supplemented by whatever C functionality is lying around, and POSIX networking exists.

That they haven't felt the need to provide a more useful abstraction on top of the POSIX layer (and hey, maybe abstract over Microsoft's variant in the process) in the past 3 decades does seem like a miss

ethin|9 days ago

Networking is not in the standard library of either C or C++. It is strictly an operating system extension. Since it's provided by the operating system, I don't really see how you reach the conclusion that it is a part of the standard library. The standard library is, after all, distinct from what the OS provides.