the following piece of pseudo-C-code
is_approved
False
isNotEqualTo
True
is_ok
that's a lot of true/false stuff going on in there, probably not FAA approved.
Since pseudo code doesn't need to pass any tests, I'm sure you could do your pseudo code to c++ (at least in this forum)-
Project myproject;
while( not myproject.committed() ){ myproject.start_over() }
we don't need to know what's in the Project process, and if we do you can show us the Project class.
LOL you made the trick, I do like it
OOTiA is still the C++ challenge I have *zero* direct experience with space defense, but I know by having read a fifteen years ago paper where there was the name of the U.S. Federal Aviation Administration enlisting the National Aeronautics and Space Administration's support for a project called "
Object-Oriented Technology" in Aviation, which went beyond just C++ issues.
So they tried, and the project is where to look for identifying concerns about OOT relevant to safety and certification and object-oriented usage in safety-critical applications.
It's kind of *guidance bible* to certification representatives who are approving object-oriented applications to DO-178B objectives.
Fifteen years later ... we still have to be synched to the guidance. But don't panic, sooner or later ...
Quote
Quoteweird for somebody who didn't know about std::array, to compare it with the more advanced std::vector
yes, well... I'm very much an ASM or C programmer trying to learn new things.
huh. I also see that std::array apparently wasn't added until C++11. ("Really? Are they kidding?!")
Then you have unit tests for single-stepping through code, static_assert to prevent cross-compilation regressions, and inline assertions for run-time debugging (in unit-tests and potentially on the device) plus providing hints for static checkers (although most formal checking tools need loads more info to work by any stretch of the imagination - and you'd be damned if you use any kind of loop).
let's talk about
tools, static checkers, checking tools, et al: which tool do you use?
So far seems to be a faith between microcontroller world and PC world. A project will work if developers knows the language used C or C++. The C++ is used in the PC applications but C is most like in OS side. We should use some of experience from PC and apply in the microcontroller since the are more more powerfull, and have more common projects external RAM and SD card attached. Is it possible?
In the automotive also is used a subset of C99, constraind by MISRA rules. Should this be changed? It feels like I am 20 yeas into the past when I do programming at work. I am still wandering if I should start my home project stm32 based, in C++.
Did someone face this challenge to transform one project that is already existing in C to C++?
I am still wandering if I should start my home project stm32 based, in C++
You can wonder for a long time, but until you try it you will not know.
I am still wandering if I should start my home project stm32 based, in C++.
I would definitely try it. That's the only way to see for yourself. I would re-write it (rather than porting) trying to utilize as much of new features as I can. It'll give you a better feel of what C++ is.