Live data from Hacker News

C++ Modules Are Here to Stay

faresbakhit.github.io

141–143 of 143 posts

Re: C++ Modules Are Here to Stay

#141
post #50

Earlier quoted context omitted.

Yes. Unfortunately the committee has completely abandoned safety at this point. Even memory/thread safety profiles have been indefinitely postponed. The latest ghost safety lifetimes thing is completely unimplementable There literally isn't a plan or direction in place to add any way to compete with Rust in the safety space currently. They've got maybe until c++29 to standardise lifetimes, and then C++ will transitio…

Using containers and std::string for everything eliminates the majority of safety bugs.

You need `GSL` and `lifetimebound` to approach most modern safety bugs.

Re: C++ Modules Are Here to Stay

#142
post #5

why use modules if PCH on your diagram is not much worse in compile times?

Macro hygiene, static initialization ordering, control over symbol export (no more detail namespaces), slightly higher ceiling for compile-time and optimization performance. If these aren't compelling, there's no real reason.

We live with that for *decades*. For me this is not a daily problem. So yes, this is not compelling, unfortunately.

Re: C++ Modules Are Here to Stay

#143
post #16
post #5

why use modules if PCH on your diagram is not much worse in compile times?

modules are the future and the rules for are well thought out. Ever compiler has their own version of PCH and they all work different in annoying ways.

> Ever compiler has their own version of PCH and they all work different in annoying ways.

I don't care because I use cmake

Post reply on HN