From owner-freebsd-arch@FreeBSD.ORG Sat Oct 27 10:50:02 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 3542216A417; Sat, 27 Oct 2007 10:50:02 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id C394A13C480; Sat, 27 Oct 2007 10:50:01 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 41BEE3E014; Sat, 27 Oct 2007 06:50:01 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 27 Oct 2007 06:50:01 -0400 X-Sasl-enc: BL73daX3H9b5AS/gZQMkuCv/41R2JciBbxhQ4uJt4SEL 1193482200 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id A21CC207B7; Sat, 27 Oct 2007 06:50:00 -0400 (EDT) Message-ID: <472317D7.8010406@incunabulum.net> Date: Sat, 27 Oct 2007 11:49:59 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.6 (X11/20070928) MIME-Version: 1.0 To: Poul-Henning Kamp References: <12773.1193480527@critter.freebsd.dk> In-Reply-To: <12773.1193480527@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alfred Perlstein , 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: Sat, 27 Oct 2007 10:50:02 -0000 Hi Poul, Thanks for the feedback. Poul-Henning Kamp wrote: > I think it would be nice to augment C in the kernel, but C++ would > not be the correct augmentation for this purpose. > I should point out that I am not recommending the habitual use of C++ for FreeBSD kernel development, nor am I condoning that we accept C++ code into the tree without any *less* consideration than might be the case for contributions in other languages (usually C). I reiterate: as per my message to Alfred, C++ makes it very easy to write bad code, but despite this, it is a very powerful tool when wielded properly. My experiences in working with C++ have been very positive, although limited because I have been very choosy about the subset of the developers, and C++ code, that happen to exist in the world... > Instead of repeating myself, I'll just refer to my previous ramblings > on the subject and the SoC correspondence on the 'K' language > experiments. > I could not find any reference to this discussion in a mailing list search. I did read the article at: http://wiki.freebsd.org/K. It sounds like a new and interesting approach to a C-like language (* see footnote). However, that was not the original topic of my thread, which is to gauge interest for C++ runtime support in FreeBSD and if anyone is already doing this. C++ is happening *now*, in other environments, it is more relevant to what people are doing in the wider world than K, so I don't see how K is analagous to C++, it would be most helpful if your discussion on this issue were more easily available. The ultimate litmus test is how it gets used and if it's a qualitative, and quantitative, improvement. regards, BMS (*) It sounds like K reinvents Microsoft's Structured Exception Handling (SEH). GCC have had a Google SoC student working on porting SEH to GCC, I contacted their SoC mentor this week to try to find out what the status of that code is.