Date: Tue, 15 Aug 2000 15:33:42 -0500 (CDT) From: Mike Meyer <mwm@mired.org> To: "t g" <unixboy007@hotmail.com> Cc: questions@freebsd.org Subject: why c? Message-ID: <14745.43302.410395.328073@guru.mired.org> In-Reply-To: <8519396@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
t g writes: > i've been trying to learn unix off and on for a while now, and i finally > trashed windoze ;-) now i'm running freebsd 4.0-release (only... no more > windows at all!). > > anyway, when i was in college (not to long ago) i took a number of > programming classes and all but one of them used c++. so, my question is, > why is everything written in c? is it simply because unix was written > before c++, or is c better for an os? Yes, Unix predates C++. I'm pretty sure Unix predated C, as before C there was B, and before B there was BCPL, and the first C compilers were written for Unix. However, the history of the two is to tightly coupled to tell at this distance, so you'd have to ask someone who was there. Yes, C is better for OS work than C++. OS code needs to be close to the hardware, and as efficient as possible. C++ sacrifices efficiency, and possibly the ability to get close to the hardware, attempting to provide a higher level of abstraction. C, on the other hand, includes things so that you can reliably manage hardware. > i'm also interested in a good book on programming operating system if anyone > has a recommendation (doesn't have to be geared toward unix). Well, Lyon's book on Unix makes a good one, though it's a bit dated. <mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14745.43302.410395.328073>