Date: Sun, 16 Apr 2006 16:50:07 +0200 From: Benjamin Lutz <benlutz@datacomm.ch> To: freebsd-chat@freebsd.org Subject: Re: Why is not more FreeBSD software written in C++? Message-ID: <200604161650.11428.benlutz@datacomm.ch> In-Reply-To: <200604151313.32519.benlutz@datacomm.ch> References: <200604151313.32519.benlutz@datacomm.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604161650.11428.benlutz>