From owner-freebsd-hackers Tue Mar 5 8:49:37 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 6B10937B400 for ; Tue, 5 Mar 2002 08:49:30 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g25GnPi77727; Tue, 5 Mar 2002 09:49:25 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g25GnNL76760; Tue, 5 Mar 2002 09:49:23 -0700 (MST) (envelope-from imp@village.org) Date: Tue, 05 Mar 2002 09:49:27 -0700 (MST) Message-Id: <20020305.094927.40858673.imp@village.org> To: culverk@alpha.yumyumyum.org Cc: vel@bugz.infotecs.ru, freebsd-hackers@FreeBSD.ORG Subject: Re: C vs C++ From: "M. Warner Losh" In-Reply-To: <20020305102829.A3576-100000@alpha.yumyumyum.org> References: <200203051407.g25E7Cd67446@bugz.infotecs.ru> <20020305102829.A3576-100000@alpha.yumyumyum.org> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020305102829.A3576-100000@alpha.yumyumyum.org> Kenneth Culver writes: : > I have a small problem. I work for software development company and : > write daemons and console tools for Unix. My boss wants everything to be : > written in C++, because he thinks C++ is cool. I prefer C for such : > tasks, but I cannot really put good arguments of why and where C++ can : > be worse than C. I know many of you prefer C too. Can you please explain : > some disadvantages of C++ comparing to C ? Is it slower, does it produce : > less effective code, why is it like that, etc ... or please direct me to : > some articles where this can be explained. : : My main problem with C++ is that it adds a lot of overhead, and it's slow. : Also, it drives me nuts when people code in C++ and write all kinds of : classes when using classes for certain things just doesn't make sense, and : makes the code much more convoluted. C++ doesn't add noticable overhead and isn't slow, unless you are a dumbass about how you write it. All languages give you plenty of ways to write speghetti fortran code :-). C++ gives you a number of ways to obfuscate. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message