Python is the fastest growing language due to a feature you've never heard of

  • Wow, clickbait title.

    Save everyone a click:

    The buffer protocol was (and still is) an extremely low-level API for direct manipulation of memory buffers by other libraries. These are buffers created and used by the interpreter to store certain types of data (initially, primarily "array-like" structures where the type and size of data was known ahead of time) in contiguous memory.

    The primary motivation for providing such an API is to eliminate the need to copy data when only reading, clarify ownership semantics of the buffer, and to store the data in contiguous memory (even in the case of multi-dimensional data structures), where read access is extremely fast. Those "other libraries" that would make use of the API would almost certainly be written in C and highly performance sensitive. The new protocol meant that if I create a NumPy array of ints, other libraries can directly access the underlying memory buffer rather than requiring indirection or, worse, copying of that data before it can be used.

  • This is basically the fourth why in the 5 whys chain.

    Why is python the fastest growing? Data Science

    Why is it popular for Data Science? numpy and friends

    Why do numpy and friends rock? They're efficient and easy to use.

    Why are they efficient? Buffer protocols

    Why buffer protocols? Because Oliphaunt et al wanted libraries that were efficient and easy to use, and they decided it would be easier to make an easy to use language efficient than an efficient language easy to use.

    Most of the time you don't care to dig down so deep, but it's interesting to do so.

  • I've heard of that feature, get out. I'm not a good programmer but everyone writing any significant amount of code in a language should read the language textbook at least once.

  • Come on, less of the clickbait please.