Why is python not written in C++ ?
Roy Smith
roy at panix.com
Mon Aug 2 20:47:42 EDT 2010
In article
<0ed1fb16-87cb-4fb9-85b2-08d876445d5d at q22g2000yqm.googlegroups.com>,
sturlamolden <sturlamolden at yahoo.no> wrote:
> The typical examples revealing incompetence are use of
> new[] instead of std::vector
To be fair, there were usable C++ compilers before there were usable STL
implementations. Thus, it should not be surprising to find older C++
code bases eschewing the use of STL. That's not to say that this trend
should be propagated in current educational material.
> and dynamic resourse allocation outside contructors.
This one I don't understand. Yes, I get RAII, but surely there are
valid reasons to allocate memory outside of constructors. Containers
which resize themselves (such as std::vector) are one obvious example.
More information about the Python-list
mailing list