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)
精彩评论