While learning #GoLang I was wondering why #Python has become so popular. Go seems just so much better in every aspect.
Maybe it's because people prefer the easiest way of #programming, using dynamic types? OK then, but still - why Python and not #LuaLang, for instance? Lua is nice, lightweight and fast.
@amarok
As with many other things that gained popularity, it was a right balance of exactly right factors that happened to be of sufficiently high quality, and a great deal of luck.
Python is very popular in AI/ML, where the only contenders were R and Fortran - not exactly high bar to pass.
@amarok I think itโs just that Go is much newer, and Python already had a cult by then.
@lifts
Good point. I just checked Python's age and it came out 1991 ๐ฎ Surprise. I thought it was much younger.
Lua *languageโs* first design principle is to keep it minimal and simple. Any effort to make it more comfortable and getting many higher level abstractions is rejected. (Which is fine, Lua is not meant as a universal programming language but more for the embedded engines; also, stack-based language). Anything which would make it more complicated or slower is rejected (e.g., Lua really doesnโt have Unicode).
@amarok And other think coul be, that Python Is interpreted - easier testing parts od code.
@mkyral
Go can compile and run in one step without saving an executable file on disk, and it's pretty fast.
For quick prototyping interpreted langs can be a better choice, of course. What I miss in Go is an interactive shell, even Java has one.
@mcepl
True. But the question is whether you really need utf-16, because utf-8 is pretty straightforward to support even in non-Unicode aware langs like Lua or C. Also there are libraries which add advanced support if needed. Lua is presented as a language for embedded systems but I think that's irritating, Lua is more versatile. Today Python scripts are everywhere and I don't like this approach, you have to install whole Python ecosystem just to get a program run which is not even written in P.
@amarok What I meant is that you really donโt have (and I donโt know about any third party library doing it well) the support for Unicode strings in whatever binary encoding. See https://lists.sr.ht/~martanne/devel/%3CCYUITPKBDDJC.22NET5BO34MVK@cepl.eu%3E and subsequent threads for discussion of upper-/lower-casing of Unicode strings. I know about `utf8` library, but it really doesnโt contain almost anything useful.
@pavel
But it somehow missed the original target (quick prototyping and supporting other programs by Python's scripting capabilities) ๐ฌ Which is a good thing, meaning that all general purpose languages may be used in all kind of fields.
Go is also a general programming language, just saying ๐ฌ
@mkyral