Why is python not written in C++ ?

Paul Rubin no.email at nospam.invalid
Thu Aug 5 14:10:04 EDT 2010


Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> writes:
> OK, I have a copy of K&R 2nd Ed on a shelf within reach here. Can you point 
> out some behaviour that C programmers might need to rely on, that is not 
> specified in that document?

C has all kinds of undefined behavior.  "Might need to rely on" is not
relevant for this kind of issue.  Ada's designers had the goal that that
Ada programs should have NO undefined behavior. 

As a famous example of C's underspecification, the behavior of

   a[i++] = i;

is undefined in C99.  See:

https://www.securecoding.cert.org/confluence/display/seccode/EXP30-C.+Do+not+depend+on+order+of+evaluation+between+sequence+points



More information about the Python-list mailing list