Readit News logoReadit News
theICEBeardk commented on The C++ standard for the F-35 Fighter Jet [video]   youtube.com/watch?v=Gv4sD... · Posted by u/AareyBaba
nmhancoc · 17 days ago
Not an expert but I’m pretty sure no exceptions means you can’t use significant parts of std algorithm or the std containers.

And if you’re using pooling I think RAII gets significantly trickier to do.

theICEBeardk · 17 days ago
theICEBeardk commented on The C++ standard for the F-35 Fighter Jet [video]   youtube.com/watch?v=Gv4sD... · Posted by u/AareyBaba
vodou · 17 days ago
Not my experience. I work with a -fno-exceptions codebase. Still quite a lot of std left. (Exceptions come with a surprisingly hefty binary size cost.)
theICEBeardk · 17 days ago
Apparently according to some ACCU and CPPCon talks by Khalil Estel this can be largely mitigated even in embedded lowering the size cost by orders of magnitude.
theICEBeardk commented on The C++ standard for the F-35 Fighter Jet [video]   youtube.com/watch?v=Gv4sD... · Posted by u/AareyBaba
elteto · 17 days ago
If you compile with -fno-exceptions you just lost almost all of the STL.

You can compile with exceptions enabled, use the STL, but strictly enforce no allocations after initialization. It depends on how strict is the spec you are trying to hit.

theICEBeardk · 17 days ago
Are you aware of the Freestanding definition of STL? See here: https://en.cppreference.com/w/cpp/freestanding.html Large and useful parts of it are available if you run with a newer c++ standard.
theICEBeardk commented on In C++ modules globally unique module names seem to be unavoidable   nibblestew.blogspot.com/2... · Posted by u/signa11
magicalhippo · 3 months ago
> But the symbol names don't matter after linking.

C++26 will get run-time reflection from what I can gather[1], in which case symbol names will matter after linking, no?

[1]: https://learnmoderncpp.com/2025/07/31/reflection-in-c26-p299...

theICEBeardk · 3 months ago
No it is gaining compile time reflection. But RTTI has been a thing for a long time.
theICEBeardk commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
dgfitz · 5 months ago
Meta: why does c++ feel almost political on this forum?
theICEBeardk · 5 months ago
c++ gets a lot of hate much of it based on past traumas with specific codebases and history of use.

This has built up into a culture where people who have little to no experience with c++ but who have been told and seen only bad headlines about it join in with those who have legitimate concerns, those who are promoting their favorite language and those who are trolls leading to a general mood.

It is almost perfectly predictable that if you open the discussion on a link to a c++ article on this site there will be someone promoting either zip, rust or circle in that discussion. There will also be a comment on the bloat of the language and someone venting their trauma from some horrible code base.

theICEBeardk commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
delusional · 5 months ago
This is interesting because it interacts with consteval. It would be cool if the standards committee could so somehow figure out how to do codegen from consteval. Then we'd be kinda close to the promised land of procedural macros written in real C++.
theICEBeardk · 5 months ago
A lot of the stuff they are working on for c++29 is exactly what you are wishing for (me too by the way).
theICEBeardk commented on Discover C++26's compile-time reflection   lemire.me/blog/2025/06/22... · Posted by u/jandeboevrie
nine_k · 6 months ago
C++'s semantics are also broken in interesting ways: UB, implicit conversions, arrays, exceptions, exceptions from destructors, etc. Papering over them won't help all that much. It's more efficient to just swallow the bullet and switch to Rust (or maybe Zig).
theICEBeardk · 6 months ago
Yeah no switching a group of developers over to some new language is not more efficient. It is a lot of work. And on top of that you will need to add time to either wrap your existing code base or rewrite it with developers who are new to the language they are using. You will have folks who like that and can do it, but you will also have a lot who would have a much harder time with that. Most corporations would legitimately ask what is switching the language gaining us and is it worth it. Now the conclusion might be that it is worth it, but it is equally possible that they decide against it. Never underestimate inertia.
theICEBeardk commented on Discover C++26's compile-time reflection   lemire.me/blog/2025/06/22... · Posted by u/jandeboevrie
112233 · 6 months ago
Oh noes, the binding of internal compiler state to STL will become even more severe with this. It started slowly. You needed exact magic std::initializer_list definition in your headers to match the code generated by the compiler, or the program would crash. RTTI (that was of little use to programs that tried to avoid standard library) Now there are coroutines and this thing. I feel like it is bye-bye to the completely non-standard compliant practice of using C++ without all the standard library. Where should embedded c++ projects go now that they are not welcome anymore?
theICEBeardk · 6 months ago
I work on a c++23 embedded platform that is used in very small microprocessors up to embedded linux stuff. We ship stuff that needs to run constant and C was just too unsafe for us (C requires you to remember to call functions RAII saves you from that) so we switched 2 decades ago (before my time there).

C++23 is not abandoning embedded. Instead there is a tonne of misinformation around that is confusing people. You can easily tell what parts of the STD is available by looking up the concept of Freestanding, which is a legitimate part of the c++ standard which tells you what is absolutely safe to use in embedded. Usually some of the non-freestanding stuff is also safe to use.

Then what you do is add support for the ETL (github.com/ETLCPP/) which will help you by offering STD like classes for the parts that are not safe to use or just give you the std class wrapped in their namespace.

What we do is turn off RTTI and for now exceptions (most compilers let you do that with ease but we are looking at maybe using them in the future because of recent research indicating it would be possible and save us binary size at the same time) and you lean heavily into the constexpr side of things because anything you can get the compiler that is running nightly or on your PC to do rather than on the embedded system is just fine. We do not use coroutines so there I have no opinion.

Personally I am looking forward to the Reflection stuff because it is all compile time (and no that does not mean that your std on your pc somehow leaks illegal functions into your code constexpr/consteval is embedded safe) and it will allow me to make code that will be easier to debug than the recursive template expansions are now (stepping through a recursion is bad even if we strictly limit the depth of them but reflection will allow me to do an expansion into a flat set of ifs instead).

u/theICEBeardk

KarmaCake day12June 23, 2025View Original