From owner-freebsd-arch@FreeBSD.ORG Sun Oct 28 06:03:09 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 3207016A420 for ; Sun, 28 Oct 2007 06:03:09 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E790813C48D for ; Sun, 28 Oct 2007 06:03:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id l9S626oP099874; Sun, 28 Oct 2007 00:02:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 Oct 2007 00:03:00 -0600 (MDT) Message-Id: <20071028.000300.-861062412.imp@bsdimp.com> To: bms@incunabulum.net From: "M. Warner Losh" In-Reply-To: <4722BDBE.5030408@incunabulum.net> References: <4722BDBE.5030408@incunabulum.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: 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: Sun, 28 Oct 2007 06:03:09 -0000 In message: <4722BDBE.5030408@incunabulum.net> Bruce M Simpson writes: : It seems a team in Iceland succeeded in making Linux C++ enabled: Most people on this list haven't had experience with eC++. In this environment, a number of the features of the language are omitted to be better suited to the embedded environment. If it were up to me, I wouldn't bother with supporting exception. They are one of the areas that are abused that have dire consequences when abused (uncaught exceptions are evil, for example). Rtti was also omitted from eC++ as well. These things help debloat the language and can be used to good effect. The kernel isn't a general purpose computing environment. However, C++ features would help in a great many cases. There's already some C++ elements in kobj, which help us in our implementation of newbus. However, as time passes, more and more things are written in other languages, including C++. Many of these other languages are totally unsuitable for the kernel. Python, Ruby and Perl, while great scripting languages, will never be in the kernel. The old vmkernel.el joke will never happen either (although there's been rumors of an in-kernel compiled-lisp interprater floating around). C++ support, driven by people's experience with OS X, will continue to be a highly desired feature. At this stage, I think if someone came forward with patches, that could be optionally installed, there would be support for including them. Maybe installed as a port. There's been little to no support for integrating C++ into the kernel for general use by the base system, so new C++ drivers or subsystems would meet extreme resistance. However, having C++ support would allow the extreme FreeBSD users to suffer or benefit from C++ in their kernels without having to reinvent the base wheel. I think the arguments are strong enough for this, but not so strong as to accept it into the base at this time without some compelling proof that it can be done, in FreeBSD, without extreme pain. Warner