see ,
still yet i have seen that mos开发者_JAVA技巧t of the embedded application are written in c. Most of the libraries are written in c. Device-driver are written in c.
So i want to ask you is there any logical reason behind this?
(My apologies if this post sounds silly/stupid. I thought I'd ask here. Ignoring these core bits never made anyone a better programmer.)
There are many reasons, including but not limited to:
- It has access to many low level functions not accessible from many other languages.
- It has existed for many many years and has lots of developers that are familiar with it.
- If written well it's extremely efficient.
- It gives almost complete control over memory etc.
- It's very portable, largely due to the myriad of compilers written for it.
Because of Dennis Ritchie. C is easily the most portable language.
精彩评论