News for hackers. Stuff that matters.
Re:Rust won: the quest for performant, reliable software [vi... by tialaramex on Saturday September 13, 2025 @04:31AM (#45230380)
> Since C++20 you can use constinit, or std::construct_at to avoid static initialization woes entirely

This is just yet another bad defaults situation. Yes, that's the correct behaviour and so it's what Rust's statics do, but it wasn't how C++ worked so they had to add this constinit keyword. LazyStatic is solving the other thing - where we don't need runtime parameters but we are doing work at runtime so we aren't truly constant.

There are no comments on this comment yet.