I come not to bury C++, but to praise it...

Derek none at none.com
Thu Jan 15 10:12:23 EST 2004


"John J. Lee" wrote...
> [...]
> > Maybe I didn't make myself clear.  I counted the ease
> > with which memory can be corrupted in C++ as a minus for
> > C++ and a plus for Python.  I agree with you.
>
> No, you don't (assuming I understand Jp's post), because...
>
> > On the flip side, C++ can catch errors immediately that
> > Python will not complain about until runtime, and in this
> > imperfect world tests may not catch all such errors up
> > front.  In this respect I consider C++ safer.
>
> ...you made no evaluation of the relative importance of
> these two qualities (memory-safety and static type-safety).
> Nor of the fact that C++ comes unavoidably packaged with the
> more-lines-of-code-per-function-point anti-feature -- KIS!

Are you joking?  Because if you have some magical way to assign a
meaningful relative importance to unrelated language features that is
sufficiently general to be useful, I'd like to hear it.

For *me* memory safety in C++ is not an issue.  I use range-checked
containers, scoped pointers, shared pointers, etc. and don't encounter
memory management/safety problems.

For *me* the lack of static type safety in Python is an issue.  We
have a lot of developers working on a relatively large Python
codebase, and sooner or later some edge case calls a function with an
argument who's type makes no sense.  Sometimes tests catch the problem
early, sometimes they don't.









More information about the Python-list mailing list