From owner-freebsd-hackers Tue Mar 5 10:32:58 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail5.nc.rr.com (fe5.southeast.rr.com [24.93.67.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B6AB37B400 for ; Tue, 5 Mar 2002 10:32:41 -0800 (PST) Received: from i8k.babbleon.org ([66.57.85.154]) by mail5.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Tue, 5 Mar 2002 09:46:53 -0500 Received: by i8k.babbleon.org (Postfix, from userid 111) id CB70BBA03; Tue, 5 Mar 2002 09:46:38 -0500 (EST) Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: "Eugene L. Vorokov" , freebsd-hackers@FreeBSD.ORG Subject: Re: C vs C++ Date: Tue, 5 Mar 2002 09:46:38 -0500 X-Mailer: KMail [version 1.3] References: <200203051407.g25E7Cd67446@bugz.infotecs.ru> In-Reply-To: <200203051407.g25E7Cd67446@bugz.infotecs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020305144638.CB70BBA03@i8k.babbleon.org> 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 On Tuesday 05 March 2002 09:07 am, Eugene L. Vorokov wrote: > Hello, > > 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. > > I apologize for the offtopic whenever it happens, but this issue > really pisses me off now. Since C++ is, with a few trifling exceptions, a superset of C, why not just write C code like you always have and compile with the C++ compiler to make him happy? Unless your boss is way more clueful than most (and I doubt it or he wouldn't want daemons written in C++, I don't think), he won't know the difference. If he wants oo programming and accessor functions for everything and design meetings where you roleplay the different objects and all that jazz, thet's a different matter, and it's worth fighting. But if he just wants you to compile with C++, I'd advise just giving in. The compiles will be a little slower and the warning messages will be more strict, but you won't have to change much of what you're doing, unless you're writing pretty "fast & loose" C code now. -- Brian T. Schellenberger . . . . . . . bts@wnt.sas.com (work) Brian, the man from Babble-On . . . . bts@babbleon.org (personal) ME --> http://www.babbleon.org http://www.eff.org <-- GOOD GUYS --> http://www.programming-freedom.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message