[OT] fortran lib which provide python like data type

Michael Torrie torriem at gmail.com
Fri Jan 30 22:49:14 EST 2015


On 01/30/2015 04:50 PM, Steven D'Aprano wrote:
> Oh great. So if the average application creates a hundred thousand pointers
> of the course of a session, you'll only have a thousand or so seg faults
> and leaks.
> 
> Well, that certainly explains this:
> 
> https://access.redhat.com/articles/1332213

I fail to see the connection. GLibc is a low-level library written in C,
not C++.  By its nature requires a lot of pointer use, and is prone to
having errors.  But not that many, seeing as *all* Linux software
depends on it and uses at least part of it *all* the time.  Pretty
remarkable if you ask me.  Wonder how they do it.  Perhaps they try to
follow "basic rules."

> Manual low-level pointer manipulation is an anti-pattern. What you glibly
> describe as programmers following "basic rules" has proven to be beyond the
> ability of the programming community as a whole.

I don't see how you would write system code without this "anti-pattern"
as you describe.  Python is a great language for everything else, but I
certainly wouldn't call it a system language.  Couldn't write a kernel
in it without providing it with some sort of unsafe memory access
(pointers!).  Or even write a Python interpreter (Yes there's PyPy, but
with a jit it's still working with pointers).

What I call glibly "basic rules" are in fact shown to more or less work
out, as Glibc proves.  Pointer use does lead to potential
vulnerabilities.  And they must be corrected as they are found.  Still
not sure what your point is.

Is there a reason to use C or C++ for many of us?  Nope.  I'm not
arguing that we should find them of use.  It's easy for us to sit on
Python and look with contempt at C or C++, but they really do have their
place (C more than C++ IMO).  This is so far off the original topic that
it probably is construed that I am arguing for C++ vs Python or
something.  But I am not.  I'm quite content with Python.  There are a
host of languages I find interesting including D, Google Go, Vala,
FreeBASIC, Mozilla Rust, etc.  But Python fits my needs so well, I can't
be bothered to invest much time in these other languages.



More information about the Python-list mailing list