From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <86ei7ry76s.fsf@cmarib.ramside> References: <86ipx4s36p.fsf@cmarib.ramside> <86ei7ry76s.fsf@cmarib.ramside> Date: Tue, 1 Feb 2011 10:33:40 -0800 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] RESOLVED: recoving important header file rudely Topicbox-Message-UUID: a6e42cbe-ead6-11e9-9d60-3106f5b1d025 On Tue, Feb 1, 2011 at 9:51 AM, wrote: >However, the Plan 9 code (at last that under /sys/src/cmd) > doesn't seem to make use of iterators, string objects (or even > object-orientation), modern string parsing routines, etc. There's a reason it does not use that stuff, and it may not be what you thi= nk. That said, why are you thinking in terms of writing in C anyway? If you're going to put a lot of work out, why not use a modern language in which strings are actually a first class object, that has garbage collection, and so on? I don't see how macro foo is going to make things all that much better. You're still stuck with C. > > It's probably worth noting that higher-level code abstractions are > probably more useful in userspace code than in the kernel. =A0This is > partly for reasons of performance, and partly because the kernel is so > much closer to the hardware. =A0The Linux kernel, for example, is still > largely written in old UNIX-style C. =A0It wasn't even until series 2.5 o= r > so that the Linux kernel became palpably object-oriented. Actually, Plan 9 kernel is palpably object-oriented in a very real sense, if you consider the whole. The plan 9 devices and servers are all accessed via a common interface, and kernel and user objects can be interchanged -- consider that one can put a custom IP stack in place just by mounting on /net. I've worked with "object oriented" operating systems written in C++ that were far less object oriented than Plan 9. Over the years I've come to believe that whether a system is object-oriented does not always depend on the language it is written in. In fact given some of the C++ code I've had to work with I almost wonder if it's not an inverse relationship ... thanks ron p.s. If you're going to rewrite /bin, maybe it's time to look at Go?