Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2006 00:41:42 -0700
From:      David Cuthbert <dacut@kanga.org>
To:        freebsd-chat@freebsd.org
Subject:   Re: Why is not more FreeBSD software written in C++?
Message-ID:  <4445E9B6.2090508@kanga.org>
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
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.

My experience writing commercial C++ code has made me swear that I'll 
never choose it again when starting a project from scratch.  Admittedly, 
this probably not applicable to a project like FreeBSD, but I'm not 
about to go changing my bias for just one environment.

The problem wasn't in the language itself but in the constantly broken 
implementations.  We were trying to integrate various third-party 
modules which invariably insisted on using incompatible versions of g++ 
(or SunPro, or aCC, or xlC, or ...).  I still have nightmares about 
seeing errors related ambiguous name resolution between "std::cout" and 
"::cout" because two files couldn't agree whether it was "#include 
<iostream>" or "#include <iostream.h>".  And don't get me started about 
duplicate or missing template symbols, and that godforsaken SunWS_cache 
directory which is always out-of-date...

These days, I write in C when I need to be close to the machine, and a 
higher-than-C++-level language otherwise; my personal tonic is Python.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4445E9B6.2090508>