A BLOG entry… on this holiday in (most of) Germany.
Many years ago i was asked to work on a project in Germany, in Düsseldorf to be precise. That is when I found out that Germans have lots of holidays, probably more than anywhere in the world, at least a lot more then in the Netherlands.
The number is varying depending in where in Germany you are. The southern states have the most, the Northern states the least. The southern states are also the economically best ones…
Coincidence? I think not.
Since I’m now at home where everybody works, i have enough time to write a BLOG entry. Today about a question that is keeping the embedded world busy since a long time:
Shall I use ‘C’ or ‘C++’?
The answer is not really simple (as expected…). There is a simple answer, it is: “It depends”. Does not help…
Depends on what? Well… on a couple of things:
- How is your ‘C++’ knowledge? It is not recommended to use an important project for your first ‘C++’ experience…. Stay with ‘C’ if you are comfortable with it.
- Is there a decent ‘C++’ compiler for your target environment? With decent I mean a real, full-fledged, used by many others ‘C++’ compiler. Not a ‘C++’ front-end, not a crippled C++ compiler.
- Do you have a lot of legacy code available in ‘C’ or in ‘C++’. Then that should be the language of choice
In earlier days other arguments would have been: how much memory does your target have? Today this is no longer valid. We (Willert) have Rhapsody frameworks available for C and C++ fr many targets. We can also compare between both languages and we have measured that in many case C++ is smaller and faster than C!
For the hard-core ‘C’ programmers: Rhapsody in ‘C’ is an excellent way to learn Object Orientation and eventually ‘C++’!
I learned to program ‘C’ in 1982 in school. I tried to learn ‘C++’ end of the 1990’s. Bought me a book (Unfortunately “The C++ Programming Language by Bjarne Stroustrup”, not exactly a learning book…..) After reading this I was no a single bit wiser about ‘C++’ . I found it very difficult to understand what Classes and Objects were. When I started using Rhapsody in ‘C’ I started to understand OO while the OO was expressed in ‘C’, which I could read and understand.
So a real answer cannot be given but the trend is towards ‘C++’. My Advise: If you can use ‘C++: do it, if you can’t, think twice about alternatives.
Happy Modeling with Rhapsody!
Walter van der Heiden (wvdheiden@willert.de)
Nice post thanks foor sharing