用于无线传感器网络的C ++

时间:2010-02-16 17:00:21

标签: c++ c networking wireless sensor

类似于:Why are RTOS only coded in C,但是:

除了关于C ++的众多神话之外,为什么它不像C / nesC(TinyOS)那样用于WSN?知道C ++可以用于Simulating Wireless Sensor Networks with OMNeT++,很难不认为它也可以用在实时嵌入式系统中,因为C是完成事件处理的。

我不想开始使用C ++比C火焰战更好,但有足够的证据表明整个C比C ++更快,更通用是一个完整的神话。看看:

C vs. 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.

Why are you still using C

1 个答案:

答案 0 :(得分:0)

我相信以下问题的答案适用于此。

<强> Is there any reason to use C instead of C++ for embedded development?

相关问题