From owner-freebsd-arch@FreeBSD.ORG Wed Oct 31 11:07:41 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 176F416A420; Wed, 31 Oct 2007 11:07:41 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout3.yahoo.com (mrout3.yahoo.com [216.145.54.173]) by mx1.freebsd.org (Postfix) with ESMTP id DAB5313C48D; Wed, 31 Oct 2007 11:07:40 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (proxy8.corp.yahoo.com [216.145.48.13]) by mrout3.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id l9VB6XoN003596; Wed, 31 Oct 2007 04:06:33 -0700 (PDT) Date: Wed, 31 Oct 2007 20:06:33 +0900 Message-ID: From: "George V. Neville-Neil" To: Giorgos Keramidas In-Reply-To: <20071031011136.GA33331@kobe.laptop> References: <20071030055840.GS33488@elvis.mu.org> <20071030163613.E70665B30@mail.bitblocks.com> <20071031011136.GA33331@kobe.laptop> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1 (i386-apple-darwin8.9.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Poul-Henning Kamp , Alfred Perlstein , Garance A Drosehn , freebsd-arch@freebsd.org Subject: Re: C++ in the kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 11:07:41 -0000 Not to jump in here and ruin the thread, but unless I missed something, the thing that's missing here is the grounding, that is, "What do we need C++, or for that matter, a kernel language for?" When Poul-Henning and I talked about K, and when I saw what a hash has often been made of kernel like systems (RTOSs as well as bigger OS Kernels) the list that popped into my mind had bits of this conversation: 1) Better support for locking primitives That is, locking primitives that can be better instrumented etc. 2) Support for components. Right now this can be done with klds but something like them as a first class feature of a language would be useful to us. 3) Something like the STL. It would be nice if we didn't re-invent the (as Kip put it) CS101 primitives. The problems with C++ are both political and technical. The political are likely the more formidable ones, but let's face it we're doing C++ like things in the kernel now (structures of pointers ARE vtables, and vice versa). It might be that a small extension to C is the right way to move towards a more powerful set of tools for kernel developement without scaring people with the C++ bogeyman (bogeyperson? ;-) What is needed to move all this forwards is either one of the following: 1) A serious proposal on C++ in the kernel that includes: a) The restricted subset of C++ we would be willing to entertain. b) A demonstration of the kernel built and running from a C++ compiler. 2) A serious proposal on a C extension language that includes: a) The list of primitives that are being added, their purposes, and how they are better than what we have now. b) A demonstration of the kernel built and running from such a set of extensions. The biggest problem here is that we'd need people committed to doing this who can work with the community. I believe this is why the K efforts, which I have been a part of and take some responsibility for, have failed. You need a group of people with experience and drive to make this work, not a bunch of us hand waving in email. Best, George