开发者

Using C or C++ to write a Linux shell [closed]

开发者 https://www.devze.com 2023-02-14 18:47 出处:网络
开发者_Python百科As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely
开发者_Python百科 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I need to write a Linux shell for a school project. We can use C or C++. I am a little more comfortable with C++, and since I'm working with a partner, the object-oriented aspect of it is helpful. However, I suspect that for some reason C is better, and that most if not all Linux shells are written in C and not C++. What are the pros and cons of using one or the other?


the only difference I'd say is the dependency on libstd-c++ if you end up using STL and stuff. Plain C implementation if done correctly will run on bare minimum system requirements (libc only)

0

精彩评论

暂无评论...
验证码 换一张
取 消