> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> Behalf Of Jan Claeys
> Sent: Tuesday, September 12, 2006 2:37 PM
> To: [email protected]
> 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
_______________________________________________
Edu-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to