From owner-freebsd-chat@FreeBSD.ORG Sun Apr 16 14:50:16 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 01E4A16A402 for ; Sun, 16 Apr 2006 14:50:16 +0000 (UTC) (envelope-from benlutz@datacomm.ch) Received: from maxlor.mine.nu (c-213-160-32-54.customer.ggaweb.ch [213.160.32.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6214743D45 for ; Sun, 16 Apr 2006 14:50:15 +0000 (GMT) (envelope-from benlutz@datacomm.ch) Received: from localhost (unknown [127.0.0.1]) by maxlor.mine.nu (Postfix) with ESMTP id 7151E2E09D for ; Sun, 16 Apr 2006 16:50:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at atlantis.intranet Received: from maxlor.mine.nu ([127.0.0.1]) by localhost (atlantis.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t8tgSazC3M4K for ; Sun, 16 Apr 2006 16:50:14 +0200 (CEST) Received: from mini.intranet (mini.intranet [10.0.0.17]) by maxlor.mine.nu (Postfix) with ESMTP id 412B62E066 for ; Sun, 16 Apr 2006 16:50:14 +0200 (CEST) From: Benjamin Lutz To: freebsd-chat@freebsd.org Date: Sun, 16 Apr 2006 16:50:07 +0200 User-Agent: KMail/1.8.3 References: <200604151313.32519.benlutz@datacomm.ch> In-Reply-To: <200604151313.32519.benlutz@datacomm.ch> X-Face: $Ov27?7*N,h60fIEfNJdb!m,@#4T/d; 1hw|W0zvsHM(a$Yn6BYQ0^SEEXvi8>D`|V*F"=?iso-8859-1?q?=5F+R=0A?= 2@Aq>+mNb4`,'[[%z9v0Fa~]AD1}xQO3|>b.z&}l#R-_(P`?@Mz"kS; XC>Eti,i3>%@g?4f,=?iso-8859-1?q?=5Cc7=7CGh=0A?= =?iso-8859-1?q?_wb=26ky=24b2PJ=5E=5C0b83NkLsFKv=7CsmL/cI4UD=25Tu8alAD?= MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1846146.lFr91Y3I4J"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200604161650.11428.benlutz@datacomm.ch> 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 14:50:16 -0000 --nextPart1846146.lFr91Y3I4J Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks for your comments all that replied.=20 So to summarize, it seems there are really no technical reasons to not use = C++=20 for base system apps in FreeBSD. A quick look at /usr/src reveals a number = of=20 programs that do actually use C++: devd, gperf, groff and OpenSSL. The=20 reasons seem to be more circumstantial or personal: the individual develope= r=20 simply prefers to use C. Why did I even ask the question? I perceive correctness as a big problem wh= en=20 programming in C. It is difficult to know for sure that a C program is=20 correct, since there are no guards against mistakes like string buffer=20 overflows, erroneous pointer handling or memory allocation. C++ is of cours= e=20 far from being a golden bullet, but it does solve some of the problems (usi= ng=20 C++ strings instead of char* generally means you don't have to worry about= =20 string buffer overflows). I realize this is first grade flame war material, so I'll stop with languag= e=20 advocacy now. Yes, I also realize that experience and knowledge are more=20 important than technical language features :) . I've lately started spending some thought on code correctness and reliabili= ty.=20 =46rankly, I find the current situation appalling. All the time bugs are fo= und=20 even in very well tested software that could easily be prevented or=20 statically recognized by better software construction tools. The big questi= on=20 is, of course, when those tools are available (and some are already), what= =20 does it take to get people to use them. Cheers Benjamin --nextPart1846146.lFr91Y3I4J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBEQlmjgShs4qbRdeQRApRzAJ9KTZvkqPc1VsAVurCDF6JgptyOJgCgg0TW Syw/6zsEGVWL7osxLfZPioY= =hkel -----END PGP SIGNATURE----- --nextPart1846146.lFr91Y3I4J--