Why is python not written in C++ ?

Neil Hodgson nyamatongwe+thunder at gmail.com
Fri Aug 6 00:59:28 CEST 2010

Paul Rubin:

> 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.

   Ada achieves this by describing a long list of implementation defined
behaviour (Annex M).

> As a famous example of C's underspecification, the behavior of
>    a[i++] = i;
> is undefined in C99.

   Ada does not define ordering in all cases either. For example the
order of elaboration of library_items (essentially the order in which
modules are run in the absence of explicit declarations) is defined for

first elaborating bodies as early as possible (i.e. in preference to
specs where there is a choice), and second by evaluating the immediate
with clauses of a unit to determine the probably best choice, and third
by elaborating in alphabetical order of unit names where a choice still

   Other compilers use different orders.

   I just love that "probably".


More information about the Python-list mailing list