From owner-freebsd-chat@FreeBSD.ORG Sun Apr 16 01:02:29 2006 Return-Path: X-Original-To: freebsd-chat@freebsd.org Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF7E316A403 for ; Sun, 16 Apr 2006 01:02:29 +0000 (UTC) (envelope-from j.schim@netmaniacs.nl) Received: from ithost6.ithost.nl (ns2.ithost.nl [84.246.47.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5874F43D53 for ; Sun, 16 Apr 2006 01:02:26 +0000 (GMT) (envelope-from j.schim@netmaniacs.nl) Received: from phooka.intra.schim.net (pepperann.dyndns.org [194.109.199.216]) (authenticated bits=0) by ithost6.ithost.nl (8.13.3/8.13.3) with ESMTP id k3G10VGb021986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 Apr 2006 03:00:34 +0200 (CEST) (envelope-from j.schim@netmaniacs.nl) Date: Sun, 16 Apr 2006 03:01:53 +0200 From: Joao Schim To: Benjamin Lutz Message-Id: <20060416030153.0dd838e8.j.schim@netmaniacs.nl> In-Reply-To: <200604151313.32519.benlutz@datacomm.ch> References: <200604151313.32519.benlutz@datacomm.ch> Organization: NetManiacs X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.9; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on ithost6.ithost.nl Cc: freebsd-chat@freebsd.org Subject: Re: Why is not more FreeBSD software written in C++? X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 01:02:29 -0000 On Sat, 15 Apr 2006 13:13:29 +0200 Benjamin Lutz wrote: > Something occurred to me just now. I've been looking at the summer of code > page, where I noticed the "Rewrite cvsup in C" entry. When Perl was removed > from the FreeBSD base, the general notion was to rewrite any Perl scripts in > sh or C. > > Why is it that C++ is not used for our programs? The C++ compiler is in the > base and built by default, and the OOP paradigm is a nice one, that many > programmers, especially the younger ones (like me :) ) are probably more > familiar with than the tricks and techniques used in C to achieve good > efficiency. > > My first guess is that it's a habit. People dealing with the FreeBSD source > code are used to C, and therefore use that for their apps. If it's only that, > there'd be no good reason for not writing a tool like cvsup in C++, right? Or > is there a more technical reason? > > Cheers > Benjamin > Probably tradition (K&R) is the core reason for the lack of a substantial C++ codebase. Although the difference in compile time between C++ and traditional C code is noticeable, it is on modern systems not that much of an issue. (especially when considering we don't compile our system once a day) However, what can be seen as a big plus for traditional C is that the knowledge is quite widespread, what makes the code very maintainable within un*x circles. >From what i've heard the people from SUN decided to go for GNOME as their linux desktop system (long time ago) because they just happen to have more C programmers than C++, i guess the same paradigm applies to the FreeBSD base system. One might even go as far to say that if you can't do it in C what the heck are you doing in the base of an operating system... ......not saying that I would go as far ;) Kind regards, Joao -- ---------------------------------------------------------------------- J.H.M. Schim tel:070-3451049 06-53899169 /| / /| /| j.schim@netmaniacs.nl / | / / | / | http://www.netmaniacs.nl / |/ et/ |/ |aniacs v. Speijkstraat 218, 2518 GK Den Haag Netherlands ----------------------------------------------------------------------