3 ms·
Okay so like...question time. You decide that you're going to write a new HTTP request library in Python. Do you a) wrap libcurl, a blindingly fast and comple
by busterarm 5y ago
Okay so like...question time.
You decide that you're going to write a new HTTP request library in Python.
Do you a) wrap libcurl, a blindingly fast and complete library that has had more man-hours of effort put into it than most other codebases on the planet, or b) write something from scratch?
Because out of the 8 or 9 popular Python libraries in use for solving this problem, only PycURL chose a.
- shawnz 5y agoI would probably write it from scratch to avoid bringing in a big dependency which requires a FFI to use it just for a simple protocol like HTTP. What languages use libcurl in their idiomatic HTTP library? As far as I can see, only Rust uses it in the standard library (EDIT: actually it doesn't). Go has its own HTTP implementation.
- busterarm 5y agohttps://everything.curl.dev/bindings https://everything.curl.dev/bindings In many cases on this list the listed library is a popular option.
- steveklabnik 5y agoWhere does Rust use libcurl in the standard library? I didn't think it did, but it's very possible I'm wrong.
- shawnz 5y agoMy mistake, I just quickly googled it and misinterpreted some documents I saw. In fact it doesn't
- steveklabnik 5y agoIt's all good! We certainly rely on it in other ways, like the build system and such. libcurl is so ubiquitous I would have totally believed that we somehow developed a dependency on it.
- Spivak 5y agoI'm confused as to why this reflects on Python the language rather than random people writing Python code? Is it a complaint that FFI is too hard to get right?