類似: RTOSがCでのみコーディングされているのはなぜですか?
C ++に関する多くの神話に加えて、なぜそれはWSNのC / nesC( TinyOS )ほど使用されないのですか?C++がOMNeT++を使用したワイヤレスセンサーネットワークのシミュレーションに使用できることを知っていると、Cがイベント処理を実行するため、リアルタイムの組み込みシステムでも使用できるとは考えられません。
私はC++がCの炎上戦争よりも優れていることを始めたくありませんが、C ++全体が完全な神話であるよりも速く、より用途が広いことを示す十分な証拠があります。を見てみましょう:
次の点が強調されたC対C++の論文:
- C++ is slower than C: Wrong! Many C programs are valid C++ programs as well - and such a C program should run at identical speed when translated with either the C and with the C++ compiler.
- C++ specific features give overhead: Wrong! The so-called overhead introduced by certain C++ specific features (such as virtual function calls or exceptions), is comparable to the overhead you yourself would introduce should you choose to go thru the pain it would be to implement a similar feature in C.
- C++ is object oriented: Wrong! The C++ language contains some language extentions over C, that make object oriented programming and generic programming more convenient. C++ does not force object oriented design anywhere - it merely allows for it if the programmer deems OO feasible. C allows for object oriented programming as well, C++ only makes it simpler and less error prone.