7 ms·
> Would a more rigorously-typed alternate-universe Python have been as successful? One of the reasons Python became popular was its reputation as “executable p
by pansa2 6y ago
> Would a more rigorously-typed alternate-universe Python have been as successful?
One of the reasons Python became popular was its reputation as “executable pseudocode”. Rigorous typing would detract from that.
Guido and the authors of Mypy clearly believe that now the language is popular, it can afford to add explicit types and become less like pseudocode. But I don’t think it would have become as popular had it taken this direction from the beginning.
- lmm 6y ago> One of the reasons Python became popular was its reputation as “executable pseudocode”. Rigorous typing would detract from that. Not necessarily, if it had good type inference. I write Scala that looks pretty close to Python (unfortunately the community as a whole makes extensive use of symbolic names, which I think is a mistake, but you can avoid those libraries), and with Scala 3's indentation-based syntax it can become even more so.
- pansa2 6y ago> I write Scala that looks pretty close to Python Interesting. I’ve never used Scala - do you have any example code available?
- lmm 6y agoHmm, now that I look at it my personal code is mostly gnarly functional libraries. https://github.com/m50d/plus-minus-zero/ https://github.com/m50d/plus-minus-zero/ is probably the project that's closest to something I'd do in Python, but I've still used a fancy reactive library and some functional tools for dealing with the explicit async futures. (It's a quick calculator tool to compute your European Mahjong Associaton rank score based on your tournament results, and can import your existing results through some quick and dirty web scraping. The domain linked from github has expired, but it's running at https://adoring-khorana-c20461.netlify.app/ https://adoring-khorana-c20461.netlify.app/ - Scala usually runs on the JVM but this build is set up to compile to JS and run in the browser).