Hacker News new | ask | show | jobs
by clutchski 4695 days ago
Batteries included is a fine philosophy when starting a language to encourage early adoption, but at this point, I don't think it's worth adding new libraries to the stdlib. Here's why:

- It's very easy to find and install third party modules

- Once a library is added to stdlib, the API is essentially frozen. This means we can end up stuck with less than ideal APIs (shutil/os, urllib2/urrlib, etc) or Guido & co are stuck in a time consuming PEP/deprecate/delete loop for even minor API improvements.

- libraries outside of the stdlib are free to evolve. users of those libraries who don't want to stay on the bleeding edge are free to stay on old versions.

3 comments

The PEP acknowledges the existence of high-end statistics libraries. It also notes that the alternative to such libraries are DIY implementations - which are often incorrect in their implementation.

The PEP proposes adding simple, but correct support for statistics.

Apart from high-end libraries being an overkill and DIY implementations being incorrect, the PEP also cites resistance to third party software in corporate environments. This problem is more social than technical though, and I'm not sure what weight must be attached to it

There is a different perspective on the frozen APIs. Using an API from the stdlib gives you the certainty that your program is not going to break with a minor python version bump. This might not matter for all software but is crucial for others.
Those are good reasons for rejecting any addition to the standard library. However, new libraries are sometimes added to the standard library, which means the reasons you listed can be overcome by even better reasons for inclusion.

What are those reasons for why a new library can be included, and why aren't those reasons appropriate justification for including this proposed statistics package?

> However, new libraries are sometimes added to the standard library, which means the reasons you listed can be overcome by even better reasons for inclusion.

Or overcome by bad judgement.