C or CPP | developer.brewmp.com C or CPP | developer.brewmp.com

Developer

C or CPP

Forums:

Hello everybody

we are developing a apllication in brew. We have option either to use C or CPP. But I am confused which to use C or CPP, please if anybody knows what to use either C or CPP , which one is better?

Thanks.

prasham wrote:Hello everybody
we are developing a apllication in brew. We have option either to use C or CPP. But I am confused which to use C or CPP, please if anybody knows what to use either C or CPP , which one is better?
Thanks.
Assuming you are referring to C++, there are a couple of tradeoffs. C++ adds support for classes and object oriented programming, which can make your programs more logical. C++ also tends to incur more overhead. Generally, I think you may want to avoid C++ if you are aiming for a very high performance application (game?), but you may want to use C++ if you are more concerned about maintainability and implementation time (though C++ features can take some time to learn as well).
Another thing to note is that you may be constrained to limited subset of C++ if you are planning to use the ADS compiler. If you are using GCC these limitations seem to be less. Someone else may be able to add more detail on this issue...
-Al

prasham wrote:Hello everybody
we are developing a apllication in brew. We have option either to use C or CPP. But I am confused which to use C or CPP, please if anybody knows what to use either C or CPP , which one is better?
Thanks.
Assuming you are referring to C++, there are a couple of tradeoffs. C++ adds support for classes and object oriented programming, which can make your programs more logical. C++ also tends to incur more overhead. Generally, I think you may want to avoid C++ if you are aiming for a very high performance application (game?), but you may want to use C++ if you are more concerned about maintainability and implementation time (though C++ features can take some time to learn as well).
Another thing to note is that you may be constrained to limited subset of C++ if you are planning to use the ADS compiler. If you are using GCC these limitations seem to be less. Someone else may be able to add more detail on this issue...
-Al

ADS is compliant with embedded C++ specification sufficient for any embedded C++ applicaiton. For example we have very large C++ application that runs perfectly fine in BREW.

ADS is compliant with embedded C++ specification sufficient for any embedded C++ applicaiton. For example we have very large C++ application that runs perfectly fine in BREW.

ruben wrote:ADS is compliant with embedded C++ specification sufficient for any embedded C++ applicaiton. For example we have very large C++ application that runs perfectly fine in BREW.
When I mentioned the limitations, I was referring to full C++. Embedded C++ removes quite a few significant features, which can make certain things tricky to implement. gcc supports nearly the full C++ spec.

ruben wrote:ADS is compliant with embedded C++ specification sufficient for any embedded C++ applicaiton. For example we have very large C++ application that runs perfectly fine in BREW.
When I mentioned the limitations, I was referring to full C++. Embedded C++ removes quite a few significant features, which can make certain things tricky to implement. gcc supports nearly the full C++ spec.