From: Ethan Furman on
John Bokma wrote:
> Ethan Furman <ethan(a)stoneleaf.us> writes:
>
>> John Bokma wrote:
>>> Michael Torrie <torriem(a)gmail.com> writes:
>>>
>>>> On 08/01/2010 07:09 PM, John Bokma wrote:
>>>>>> One thing that comes to mind is that it's much easier to
>>>>>> distribute C libraries than C++ libraries.

>>>>> In the beginning of C++ there were programs that just converted C++ to C
>>>>> (frontends). At least that is how the C++ compiler Acorn sold worked.
>>>>> So I don't think your argument was much true back then.

>>>> No, he is still right. Each C++ implementation did name mangling
>>>> differently leading to "C" libraries that had incompatible names and
>>>> signatures. Also each frontend could have generated incompatible
>>>> vtables and other C++ structures. So C code generated by one C++
>>>> frontend could not easily call C code generated by another C++ frontend.
>>>> So the same arguments that are made about C++ now were just as valid
>>>> back then when C++ was merely a fancy preprocessor.

>>> See my other post: I understand that two C++ preprocessors can't call
>>> each others generated code, but if one uses C++ and knows that one can
>>> only use shared C libraries on target systems, and not C++ libraries
>>> that might be present (or more likely not: C++ was new in those days).

>> So if Python were written in C++, and an extension was written in C++,
>> how could the two call each other?
>
> Via C.

Huh? Presumably Python itself is not a library, and the extension may
not be a library, at some point they will have different name mangling
schemes... are you suggesting that after going through the effort if
writing all this in C++ you would then have to write a wrapper in C so
the two could talk to each other?

~Ethan~
From: Roy Smith on
In article <87aap3uyo7.fsf(a)castleamber.com>,
John Bokma <john(a)castleamber.com> wrote:

> > Go look at the original claim, the one that you responded to. "It's
> > much easier to distribute C libraries than C++ libraries."
>
> Yup, and if I read it correctly the claim was: and that's why C++ was
> not chosen. I doubt it.

I didn't intend to claim quite that much. I'm just saying it's a
consideration. I was not privy to the original design decisions.
From: Martin v. Loewis on
> Has it ever been planned to rewrite in C++ the historical implementation
> (of course in an object oriented design) ?

Around the time Guido coined the term "Python 3000" (i.e. in 2000), he
also said at a few occasions that it would be written in C++. He
subsequently dropped the idea, for the reasons that people have been
discussing.

Regards,
Martin
From: Lawrence D'Oliveiro on
In message <i3982t$79s$2(a)reader1.panix.com>, Grant Edwards wrote:

> I've always thought Ada was a pretty nice embedded/systems languages,
> but some of the initial implementations were indede horrible.

Well, there's GNAT, the GNU Ada implementation. Seems pretty robust and
complete, while offering backward compatibility with some of those “initial
implementations”, presumably because people have so much code already
written for them.

Disclaimer: the most complicated Ada program I've ever written is this
<http://www.codecodex.com/wiki/Concurrent_Quicksort>. Or maybe this
<http://www.codecodex.com/wiki/Parallel_Sieve_of_Eratosthenes>. :)
From: Grant Edwards on
On 2010-08-04, Lawrence D'Oliveiro <ldo(a)geek-central.gen.new_zealand> wrote:
> In message <i3982t$79s$2(a)reader1.panix.com>, Grant Edwards wrote:
>
>> I've always thought Ada was a pretty nice embedded/systems languages,
>> but some of the initial implementations were indede horrible.
>
> Well, there?s GNAT, the GNU Ada implementation. Seems pretty robust and
> complete, while offering backward compatibility with some of those ?initial
> implementations?, presumably because people have so much code already
> written for them.

Yep, I've installed Gnat a couple times with the intention of playing
around with it, but there's pretty much zero chance I could sell it at
the office in place of C/C++ for embedded stuff, and for desktop stuff
it's just way to easy to get programs done using Python.

I also looked at Modula-3 once, and thought it had some real promise,
but I think it's probably deader than Ada now.

--
Grant