[OT] fortran lib which provide python like data type

Paul Rubin no.email at nospam.invalid
Fri Jan 30 19:23:21 CET 2015


Michael Torrie <torriem at gmail.com> writes:
> Follow basic [C++] rules and 99% of segfaults will never happen and
> the majority of leaks will not happen either.

That is a safe and simple approach, but it works by copying data all
over the place instead of passing pointers, resulting in performance
loss.  Alex Martelli used to post a good riff here about how the main
reason to use C++ in the first place was for when you needed to
explicitly control resources for performance.  So the "data copying"
style seems to somewhat miss the point.

Smart pointers have similar issues to Python's reference-counted
allocation, e.g. cache and thread unfriendliness, and no compaction
mechanism AFAIK.  Plus I always found them scary in terms of subtle bug
potential due to abstraction leaks.  But I haven't used them so far.



More information about the Python-list mailing list