[linux-elitists] Nobody's favorite language? C++ and free software

Martin Pool mbp@samba.org
Tue Mar 25 22:24:11 PST 2003

On 25 Mar 2003, Alan DuBoff <aland@SoftOrchestra.com> wrote:
> On Tuesday 25 March 2003 15:14, Martin Pool wrote:
> > More to the point: why does *anyone* use C++?  
> If you ask such a basic question, probably no use in answering it, your 
> implication is that you see no use in it.

It was not intended to be quite as hostile as you think.  I admit it's
not my favourite language, but I think you can still look for
social/political/market reasons why people use something, in addition
to technical qualities.  For example C succeeded largely on the back
of Unix and Perl because of CGIs.

> > I think the absolutely dominant reason is that the first really usable
> > development kit for Windows (circa 3.0) used C++:
> Bzzzt...wrong answer. 

Who gave you the buzzer?  You don't even have your facts straight: 3.1
came out in 1991-92.


> Win 3.1 (arguably the first usale version of win) came to surface
> around '88-'89 timeframe. There was only C APIs available to code to
> at that time. MFC which was ms's attempt at OOP came later.

By "usable" I meant "approachable to average programmers", not usable
for users.  

The native C APIs were very low-level and hard to use correctly.  It
was vaguely comparable in Unix terms to doing X without a client

> AFAIK, msc 6.0 never supported C++.

That's correct, but it also shipped before Windows 3.1, and before
many people were serious about Windows development.  This is exactly
my point: Microsoft and Borland selected C++ as the standard
application language just at the time that Windows started to become
usable.  I think it's hard to deny that this gave C++ an enormous

See for example


Microsoft wanted to provide an easier API both to encourage 3rd-party
apps, and also as a way to sell compiler upgrades.  "Making it easy to
do Windows" was a credible story about why people needed to upgrade
their compilers and personal skills to C++.

They might equally well have chosen to instead provide an OO C library
like GTK+, but they did not.  I'd speculate this had something to do
with power relationships between the OS and compiler groups: if the OS
team had been responsible for the library, they might well have done
it in C, which would have been easier for many users to adopt.

I'm not quite sure what part of this you disagree with.  Do you think
people would have written applications in C++ even if all the
Microsoft APIs were in C?


More information about the linux-elitists mailing list