[Edu-sig] Compatibility and legacy in language evolution

Radenski, Atanas radenski at chapman.edu
Wed Sep 13 03:07:50 CEST 2006


> -----Original Message-----
> From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org]
On
> Behalf Of Jan Claeys
> Sent: Tuesday, September 12, 2006 2:37 PM
> To: edu-sig at python.org
> Subject: Re: [Edu-sig] Compatibility and legacy in language evolution
> 
> Op za, 09-09-2006 te 17:53 -0700, schreef Radenski, Atanas:
> > Strictly speaking this is true, but Mr. Stroustrups own papers also
> > explain how important the full C/C++ compatibility is - and that
> > achieving it is his ideal
> 
> Well, strictly speaking language A can only be fully compatible with
> language B and have more features if language B has a mechanism for
> extension that ignores unknown features.  Considering that C has no
such
> mechanism, C++ will never be 100% compatible with C.
 
Well, compatibility can be defined in *various* ways of course.

If one is an extremist regarding compatibility, one can say that C++ is
not compatible with itself. Indeed, the same C++ program may behave
differently under different compilers - for the simple reason that some
language features, particularly those related to integer types, are left
implementation-dependent. The same program may run correctly under one
compiler and misbehave under another. Hence - C++ is incompatible with
itself. 

What matters in my opinion is not extremism, but a practical
compatibility, as already explained by Joshua Zucker: "... a C
programmer can start writing C++ programs without having to change
anything -- legal C programs will still run just fine in C++.  Then the
C programmer can gradually learn whatever parts of the extensions of C++
at whatever rate, and slowly evolve into a C++ programmer. " 

Thinking of it, this kind of compatibility can provide mighty support
for an evolving language.

> Jan Claeys

Atanas Radenski


More information about the Edu-sig mailing list