From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 12 15:46:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8330216A4DF for ; Wed, 12 Jul 2006 15:46:44 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id C001043D9A for ; Wed, 12 Jul 2006 15:46:43 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 68119 invoked by uid 1001); 12 Jul 2006 15:46:42 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Wed, 12 Jul 2006 11:46:42 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17589.6498.456179.132004@bhuda.mired.org> Date: Wed, 12 Jul 2006 11:46:42 -0400 To: rick-freebsd@kiwi-computer.com In-Reply-To: <20060712144827.GA99296@megan.kiwi-computer.com> References: <20060712090019.GA723@turion.vk2pj.dyndns.org> <20060712141029.35239.qmail@web32707.mail.mud.yahoo.com> <20060712144827.GA99296@megan.kiwi-computer.com> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, pfgshield-freebsd@yahoo.com Subject: Re: kern/99979: Get Ready for Kernel Module in C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2006 15:46:44 -0000 In <20060712144827.GA99296@megan.kiwi-computer.com>, Rick C. Petty typed: > On Wed, Jul 12, 2006 at 04:10:29PM +0200, pfgshield-freebsd@yahoo.com wrote: > > C++ is the de-facto standard for OO > That is just sad. So many other languages do a much better job of > implementing OO (Smalltalk, Java, Python, even Scheme). While we're at > it, why not implement a bytecode interpreter for all of these languages > into the kernel? That would be sweet.. Who needs a byte code interpreter? My favorite Scheme implementation (back when I wrote a lot of Scheme) was DECWRL's Scheme->C, which compiled Scheme to C. Likewise, most Eiffel implementations (if you want a good OO langauge, that's the one I'd pick) compile to C. Of course, the right way to access those languages from the kernel is to put stubs in the kernel to call userland code to do the work, as has already been suggested. That works. There are file systems written in Python. > I'm being facetious here; OO has some merit but aside from that, there's > very little utility an additional language can provide. Not true. I'll take a moment to point out that my comments about not picking C++ just because it's popular apply to OO as well. The functional programming folks make a good argument that their style is as or more productive than OO - at least for people who understand it. In particular, the high-end functional languages provide facilities that don't exist in most languages: a turing complete system for code creation at compile time. Ok, C++'s STL has it, but it's *really* hard to use, and I don't think anyone wants STL in the kernel. > For this reason, BSD shouldn't bend over backwards for C++ developers any > more than it should for Python or Ruby developers. The implied stability > and consistency of a finished language is exactly what is needed for a > stable and consistent OS (kernel). Pick a language (let's call it "C") > that isn't likely to evolve any further. Oh wait, we already did :-P I know you're kidding, but someone might not realize it. BSD Unix didn't pick C; we inherited it from AT&T Unix. K&R didn't pick C either; they wrote it so they'd have a good high-level (well, for the time) language for writing systems code in. It evolved significantly well after the first kernels were written in it (anyone else remember =+?). In fact, it evolved to meet the needs of the peoplel writing code in it. This argues for picking a *less* popular/stable language than C++: BSD would be a bigger part of the community, and thus have more say in how the language evolved. And, to reference back to your comment about interpreters, the predecessor to C was B, which was interpreted. The predecessor to B was BCPL, which is why the successor to C should be P, not D. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.