| I should also add a cultural / social reason why Python is used in scientific computing and machine learning much more than JS/Ruby/Perl: Python was the only one of those languages (partially) funded by government research agencies. Guido was a research programmer in the Netherlands at CWI, and then he moved to the US when he was hired by CNRI, a research agency headed by Bob Kahn (loosely connected with DARPA as far as I remember). If you look at the backgrounds of Brendan Eich, Matz, and Larry Wall (creators of JS, Ruby, and Perl), they are quite different. None of them really worked in a research setting, and they certainly didn't develop their language in a research setting. https://en.wikipedia.org/wiki/History_of_Python 3 hour oral history with Guido: https://www.youtube.com/watch?v=Pzkdci2HDpU&t=12s Lex Fridman interview with Guido: https://www.youtube.com/watch?v=ghwaIiE3Nd8 Lua was developed in a research setting, funded partially by Brazilian oil companies as far as I remember, but I don't think it ever had a "scientific computing" focus. It was picked up more in games and apps due to the C embeddability and features like coroutines. The ML framework Torch was built on LuaJIT because it has math nearly as fast as C. But I think the language Lua is less suited toward linear algebra, again due to the lack of operator overloading. Not to mention that Lua doesn't even have separate ints and floats! This is also an issue with using JavaScript for scientific computing. |
Lua does support operator overloading:
Not sure if that was true 20 years ago.