From owner-freebsd-chat@FreeBSD.ORG Sat Apr 15 19:57:46 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 ED9BB16A402 for ; Sat, 15 Apr 2006 19:57:46 +0000 (UTC) (envelope-from jimmy@jamesbailie.com) Received: from smtp101.rog.mail.re2.yahoo.com (smtp101.rog.mail.re2.yahoo.com [206.190.36.79]) by mx1.FreeBSD.org (Postfix) with SMTP id 4346D43D45 for ; Sat, 15 Apr 2006 19:57:46 +0000 (GMT) (envelope-from jimmy@jamesbailie.com) Received: (qmail 7102 invoked from network); 15 Apr 2006 19:57:45 -0000 Received: from unknown (HELO ?70.29.126.205?) (jazzturk@rogers.com@70.29.126.205 with plain) by smtp101.rog.mail.re2.yahoo.com with SMTP; 15 Apr 2006 19:57:45 -0000 Message-ID: <44415038.4020101@jamesbailie.com> Date: Sat, 15 Apr 2006 15:57:44 -0400 From: James Bailie User-Agent: Thunderbird 1.5 (X11/20060304) MIME-Version: 1.0 To: freebsd-chat@freebsd.org References: <200604151313.32519.benlutz@datacomm.ch> <4441199C.4090802@carebears.mine.nu> In-Reply-To: <4441199C.4090802@carebears.mine.nu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Sat, 15 Apr 2006 19:57:47 -0000 Benjamin Lutz wrote: > 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. Efficiency is of prime importance in systems programming. The only language in which one can write more efficient programs than in C, is assembler, but it's not portable. If someone is writing something in C, then you can assume they are seeking efficiency over convenience. C is still the lingua franca of the programming world. You need to be proficient in it. Many of us don't need C++. It occupies the middle ground between C and higher-level languages. When I want high-level datatypes or user-defined types and polymorphism, I work in Lisp, where I am much more productive. I work in C when efficiency is the paramount concern, but even then, I would rather extend a Lisp implementation with new primitives in C only where necessary, and so avoid completely reinventing the wheel. Many C++ programmers have switched their allegiance to Java, in order to gain the benefits of garbage-collection and freedom from pointer manipulation without having to learn a new paradigm. I doubt anyone would object if you wrote anything, except kernel code, in C++, or even objective C, for that matter, as they are all supported by GCC. -- James Bailie http://www.jamesbailie.com