From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 8 21:05:06 2003 Return-Path: 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 8256016A4BF for ; Mon, 8 Sep 2003 21:05:06 -0700 (PDT) Received: from web13401.mail.yahoo.com (web13401.mail.yahoo.com [216.136.175.59]) by mx1.FreeBSD.org (Postfix) with SMTP id 066B943FF5 for ; Mon, 8 Sep 2003 21:05:06 -0700 (PDT) (envelope-from giffunip@yahoo.com) Message-ID: <20030909040505.20005.qmail@web13401.mail.yahoo.com> Received: from [200.91.194.139] by web13401.mail.yahoo.com via HTTP; Mon, 08 Sep 2003 21:05:05 PDT Date: Mon, 8 Sep 2003 21:05:05 -0700 (PDT) From: "Pedro F. Giffuni" To: freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: John Giacomoni cc: Matthew Emmerton Subject: OpenBFS (was Re: C++ code in a kernel module?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2003 04:05:06 -0000 Hi; Attached is a good reasons why someone my want to use C++ in the kernel. cheers, Pedro. (FWIW, OpenBFS is under an MIT license) _________________________ http://open-beos.sourceforge.net/tms/team.php?id=2 OpenBFS, as all file systems under BeOS, is being developed as a kernel add-on. Unlike all other file systems (and kernel add-ons in general), it is being developed in C++. Contrary to popular belief, it is possible to use C++ in the kernel provided you play by the book and follow some rules: * No exceptions * (Almost) no virtuals (well, the Query code in OpenBFS uses them) * It's basically only the C++ syntax, and type checking * Since one tend to encapsulate everything in classes, it has a slightly higher memory overhead This is acceptable as we get some benefits out of it: * Nicer code * Easier to maintain ______________________ __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com