News for hackers. Stuff that matters.
Re:C++ Modules Might Be Dead-on-Arrival (2019) by natded on Friday December 31, 2021 @01:22AM (#29745534)
How do C++ programs / programmers enforce and manage modularity in the general sense if they don't even have simplest module system? I'm not even talking of having module functors like Ocaml, but something like Rust has. It seems to be one of the most obvious steps to reduce complexity and compose program of smaller parts.
Re:C++ Modules Might Be Dead-on-Arrival (2019) by actinium226 on Friday December 31, 2021 @01:28AM (#29745558)
Mostly we rely on the system package manager. If I'm trying to compile a C++ program and I need somelib I `sudo apt install libsomelib-dev`

Works about 80% of the time. The other 20% I gotta go digging through either github or sourceforge or someone's personal website that hasn't been updated in 15 years.

Re:C++ Modules Might Be Dead-on-Arrival (2019) by petmon on Friday December 31, 2021 @03:03AM (#29745945)
It's not "enforced;" it is managed through various means including namespaces, header includes, and prefixes. For example, SQLite is a library whose functions all start with 'sqlite3'. In practice it works well enough: name collisions are uncommon and can be managed.
Re:C++ Modules Might Be Dead-on-Arrival (2019) by pubby on Friday December 31, 2021 @01:26AM (#29745552)
#include and namespaces.