News for hackers. Stuff that matters.
Re:Const vs. constexpr vs. consteval vs. constinit in C++20 by usrnm on Monday November 28, 2022 @04:59PM (#33780458)
> In old C++ you had to spend all your time worrying about manual ctors

That doesn't even make sense. Maybe you meant "destructors" but even then it has nothing to do with reality

Re:Const vs. constexpr vs. consteval vs. constinit in C++20 by devnullbrain on Monday November 28, 2022 @08:28PM (#33782490)
I mean constructors. It's the exception to have to do anything meaningful in the body of a constructor in modern C++ - you can do a lot with member initialisation lists, delegated constructors and defaulted/deleted constructors (remember boost::noncopyable?). And your assignment operators will actually be exception safe.
Re:Const vs. constexpr vs. consteval vs. constinit in C++20 by kajaktum on Tuesday November 29, 2022 @12:41AM (#33784083)
Constructors was a mistake. Stupid and simple initialisation like Rust and Go is the way to go forward.
Re:Const vs. constexpr vs. consteval vs. constinit in C++20 by JonChesterfield on Tuesday November 29, 2022 @09:10AM (#33787759)
Constructors induced exceptions, and once we have exceptions they became the failure reporting mechanism of the standard library, leaving us with goto-some-other-function-using-dynamic-scope as one of the foundation blocks of the language. Thus constructors are a reasonable contender for the worst design mistake in C++.