|
On Jul 1, 2017, at 12:48 PM, Italo Maia <italo.maia@gmail.com> wrote:
> I use python in my daily work. Considered using lua for our scripts, but, even it being faster and lighter, the few libraries and resources online available kind of made me rethink that.
>
> For now, I think lua should be used for what it does best.
...which is not as a general-purpose systems language, if I understand you correctly.
If only Lua had a (reasonable) subset of the Python libraries.
There’s a project nobody’s done: Clone the Python library designs in Lua. Map them one-to-one to Lua when the languages are close enough; subset them if necessary; omit if rarely used, or silly for Lua. Heck, prototype it with a Lua bridge for Python!
This is the kind of thing GSoC could dig into.
Yes, I am aware Python’s library is full of warts. But look at something like subprocess[1] which pretty much nails all the low-level things you need to use external processes. Notably, it tells you, “to avoid deadlock, use the communicate() method.”
--
Jay
[1]:
https://docs.python.org/2.7/library/subprocess.html#subprocess.Popen.communicate
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate