This thread is for discussing language evolution of C++, including ISO C++ topics.>WG21 2025-10 pre-Kona mailinghttps://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/#mailing2025-10
C++13 is the best version
Why is this paper included for 2025-10?>P3874R0>Safety Strategy Requirements for C++The date in the document is>Date: 2024-10-06Slop, lack of safety regarding document quality, or something else?
What are your predictions about contracts in C++26? Aye or nay? What will the national bodies do?I don't personally know enough about them to have an opinion.
>>106815624C++ can't evolve, it must be sacrificed for the sake of humanity.
>>106815864Profiles might unironically make a large difference. Even just the most barebones banning profile would do a lot of good. Removing footguns, having to worry less about and remember fewer gotchas, for basically free.
>>106815728currently, they look like asserts with extra steps. they don't resemble ada spark contracts, or require you to use coq-like syntax to enforce them.but they're a move in a good directions as it may help static-analysis framework perform better and more in-depth analysis of your code
>>106815864Rust developers are complaining that C++ has variadic generics and that Rust doesn't have them.What other languages have variadic generics other than C++? D, Swift, Typescript?
>>106815624C# + AOT is the best C++/thread
>>106816339C# is up to an order of magnitude slower than C++ doing fucking vector math. C# is a meme lang.
>>106816339>>106816397C# is a fine language in some ways. .NET is partially implemented in C++.
>>106816397>lack of knowledgehttps://devblogs.microsoft.com/dotnet/dotnet-8-hardware-intrinsics/
>>106816339I don't trust in Microsoft compilers, they are very far behind clang and gcc.
>>106816985>I don't trust in Microsoft compilers, they are very far behind clang and gcc.if by very far behind, you mean they don't randomly delete your code and break it, then sure
>>106817418Integer overflow is UB, moron.
>>106815624explain why would you care about c++ changesjust code
>>106817494muh print
>>106817418Don't have UB in your code. Simple as.
>>106817494you llm will use these new features eventually, so you have to know them
>>106817418>C# babbies get filtered by undefined behaviorto the surprise of no one, I might add
>>106817494Please explain why one wouldn't be curious, the topic can be really interesting.
>>106815624c++ needs less, not more
>>106817775Is it really that hard to deprecate old, obsolete, and duplicated features and remove them a few years later maybe by opt-in at first?
>>106816117I have been programming for a long time now. I have been using C++ for about 10 years. I do not like this language, I hate it. But you know what? At no point in time have I hated the footguns. They're not even remotely close to what's wrong with this shitheap of a language. If you can't manage with footguns, what hope do you have for managing systemic complexity which is 1000x worse?
>>106817775>>106817787Sounds like you might like a profile that bans usage of bad or old features.
>>106817805A lot of people dislike the footguns in C++. They only use a subset to better manage the language.Please elucidate more on what you then dislike, perhaps also with a few suggestions on what you think could be done.
>>106817831I might. Do you know of any?
>>106817883No, but adding one should be simple. Should I make a proposal? Or would you like to? I think it could be done easily, even without a profile framework. Just make it work without any changes to any runtime behavior, no effect on translation units. And then have one for each C++ version.
>>106817869Throwing the language in the garbage because it's not worth saving. It hasn't been since CFront 3. The moment Bjarne tacked a second type system onto the fucking thing it was over.>A lot of people dislike the footguns in C++I see a lot of people do shit like use UUIDs for a small collection, and store them in std::strings. I see a lot of people using floats for version numbers. I see a lot of people using std::map<int, some_type_t> even though it only stores values from [0,N) with no gaps. I have seen a lot of people write completely trash code as a lifestyle. I don't care what "a lot of people" think or do. I have seen people who can manage footguns but not systemic complexity, and never the other way around. "A lot of people" have no business being programmers.
>>106818130Troll answer, you didn't actually answer. Did you use an LLM?
>>106818200You simply didn't like the answer. Your lesson for today is to be more honest with yourself.
>>106818216Another troll answer, since I am perfectly honest and also right about you and your posts. And you should stop trolling and coming with inanity.
>>106818323There is nothing that can be done to save the language that doesn't involve throwing the entire language in the garbage. Your answer is in the first sentence of my post, here it is again as the first sentence of this post. But you don't like that answer, which is why you're pretending that I'm engaging you in bad faith. You're not honest with yourself because you can't acknowledge that. You're descending further into self-delusion with your denial that you are indeed honest with yourself, despite the unambiguous evidence to the contrary.Namaste.
>>106815624The only way forward is to start dropping backward support, they need to do that for a couple of versions at least. C++ is way too big and having thirty ways to do the same thing does not help when objectively only one of those ways is the most performant one
>>106818376Wrong yet again, you didn't elucidate on what you disliked about it. And then you spam all kinds of inanities that I can't be bothered to read, but it sounds like an admission. Seek professional help from a therapist, and cease lysing, troll.Are you a rustacean, like the pedophile rustacean Jeremy Bicha?
>>106818803Wouldn't a profile to ban deprecated features help with that?
>>106815624C++ is nice ive been giving it a try to take a break from Rust but I find theres too much boilerplate and the code just looks ugly.Also do I really need pointers when I can just do std::optional and std::expected and just pass references ? Obviously for embedded yeah but otherwise ?
>>106819489>Also do I really need pointers when I can just do std::optional and std::expected and just pass references ?So this is how Rustfags see programming in C++. No wonder you need the compiler to hold your hand.
>>106819489>>106819535Monologue?Rustacean trolls really need to see therapists.
>>106819535>>106819563r*st falseflagging is out of control
>>106819840>>106819894>Meds and bbc nowIndeed, you should take your medication, and cease your trolling.
>>106815624C++ is an okay language, I suppose, but let's be real, it pales in comparison to Lisp. The constant churn of new features and deprecations in C++ is a mess, and the language is too heavy and verbose. It's a relic of the early days of computing when efficiency was paramount over elegance and expressiveness.But hey, if you want to keep tinkering with C++'s quirks and gotchas, go ahead. Meanwhile, I'll be over here enjoying the simplicity, power, and beauty of Lisp. Macros, anyone? Or perhaps you'd like to discuss the intricacies of Lisp's garbage collection vs C++'s manual memory management? Remember, once you experience the joy of Lisp, there's no going back to those primitive compiled languages. So why bother with C++ or any other inferior language when you could be mastering the pinnacle of programming? Learn Lisp, and your coding life will never be the same!
>>106818803The committee has made it abundantly clear that backwards compatibility is their top priority, the language is going to fossilize. Nobody with a mature codebase will willingly upgrade to use C++26. A lot of people aren't even moving past C++17 because C++20 was such a clusterfuck. If you're writing desktop or server software, there's not much good reason to use C++. For embedded, if you're using C++ it's almost certainly before C++20, and without exceptions. Like Fortran, C++'s only relevant niche will be HPC.
>>106819995>C++ is an okay language, I suppose, but let's be real, it pales in comparison to Lisp.Didn't read beyond this line, C++ and Lisp typically have radically different use cases.
>>106820010It's stupid that the committee is letting the language die when the solution would be relatively simple.
>>106820037The committee is stuffed with people who have a vested interest in maintaining backwards compatibility. It would cost them a lot of money to reproduce the functionality of the libraries to which they've lost the source code - not to mention matching bug-for-bug compat with those libraries because of the ubiquitous UB in C++.
>>106820010A lot of lies in your post, a few halftruths or truths. A lot of system software and software that needs reliable and high performance still use C++ a lot, for instance desktop applications and game engines. Firefox, and probably most other browsers, are still mostly written in C++, their official statistics regarding Rust usage are generally very misleading due to third-party vendoring. Git clone the Firefox codebase, run cloc, save the results, and then remove third_party for Rust and run cloc again. The difference is stark. Ladybird is continuing in C++, and there are claims that Ladybird, a much younger project than Servo, has way better compliance with web standards IIRC (not that I know much about that).
>>106820010>>106820037C++ is still evolving, it is getting reflection in C++26. A possibly similar feature was ceased being worked upon due to internal Rust drama.https://thephd.dev/i-am-no-longer-speaking-at-rustconf-2023https://soasis.org/posts/a-mirror-for-rust-a-plan-for-generic-compile-time-introspection-in-rust/And I still suspect profiles in C++ could work, just something simple to ban deprecated features.
>>106815624>C++>evolution
>>106820238>>106820095
>>106820095Reflection sounds interesting to me, but I need to see it in action before I can pass judgement. If nothing else, to get what magic enums provides out of the box is almost enticing enough for me to consider it. Profiles have been proposed for over a decade now with nothing to show for it. In my eye they are nothing more than attempt to assuage regulators that C++ can be safe. Never mind that the regulators are ignorant, they only need power and motive.
retarded fucking languageuse Rust
>>106820869This but unironically
>>106815624What are the best books, or other sources, for learning C++ right now? I've hear learncpp is alright and was wondering about any others.
>>106821034There are Discord servers and subreddits where you can ask that, though beware rustling moderators.There are also mailing lists that I think you could ask.https://en.cppreference.com/w/ is great, but it might be shutting down. Rumor has it that rustlings have been harassing the owner, as rustlings have done all over the place, but I don't know the veracity of that rumor.Bjarne Stroustrup wrote some books, I don't think they are up to date though, and which books depends are suitable depends on your background, like if you are new to programming or not, know C or not, etc.
>>106820858Would anything be able to stop dead-simple profiles from being adopted? Like, only allow one single profile, that never changes code generation or behavior, and has a single purpose, namely to only bans deprecated or obsolote features?
>>106820869>>106820987https://materialize.com/blog/rust-concurrency-bug-unbounded-channels/https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI_SOFTWARE_MEMORY_SAFETY.PDFhttps://bpb-us-e1.wpmucdn.com/sites.gatech.edu/dist/a/2878/files/2022/10/OSSI-Final-Report-3.pdfhttps://archive.ph/uLiWXhttps://archive.ph/rESxehttps://lkml.org/lkml/2025/2/6/1292https://github.com/microsoft/typescript-go/discussions/411#discussioncomment-12464988https://lwn.net/Articles/1030517/https://github.com/lcnr/solver-woes/issues
>>106821597tldr?
>>106820869you know what we call rust users round here?failures
>>106821621I differentiate between Rust users and rustlings. Rust users are average, just trying to deal with Rust, and also enjoying pattern matching. Rustlings, conversely, not fine at all.
>>106821613The bottom one looks like more fun.
>>106821704some of the most efficient ways to implement double linked lists use no links at all. you can represent the data inside an array, then use another array to represent 'diffs' (added and removed elements), then when the diff grows large, you squash it with the underlying array.if you follow this pattern, you get amortized O(1) random insertions/deletions.at the benefit of O(1) random access, compared to the traditional O(n) for (doubly)-linked lists. with the added benefit of more data-locality.
>>106821532Is the C++ Crash Course book worthwhile? Or should somebody just use read Bjarnes book?
>>106815624It should become more like Rust
>>106821645>Rust users are average, just trying to deal with Rust, and also enjoying pattern matching.nobody like that exists