3 ms·
Python is a glue language. If you want to be hardcore you write something in rust (or whatever) with python bindings...
by anonu 4y ago
Python is a glue language. If you want to be hardcore you write something in rust (or whatever) with python bindings...
- threeseed 4y agoOr you can just pick a language like Java, Scala, Go etc and not need to manage two codebases, build tools, testing setups etc
- eddsh1994 4y agoOr just write in Python like Quora, Pinterest, YouTube, Dropbox, etc
- threeseed 4y agoYouTube is almost entirely C++ and Dropbox rewrote their sync engine years ago in Rust because of how ridiculously slow their Python implementation was. No one is saying you can't make a web site using Python. Just that it is inherently a slower language that is far poorer at concurrency than many other languages.
- necovek 4y agoPython is not slow for concurrency: Python has built-in cooperative concurrency that's pretty efficient, and if you care about minimum task time vs running more tasks in parallel, you need to look at multiprocess execution. In the latter case, you are generally inefficient with memory use, but if that's not an issue, you'll be effectively using your CPUs. However, Python is slow compared to most compiled languages for simple large loops over any data structure. A good example is how ORM libraries will fetch a million rows from the database as a list of tuples in roughly the time the db emits them at (say, a second with C-based code), yet it will take them 100x or 1000x as long to turn those rows of tuples into Python objects with pure Python code.
- hbrn 4y agoBoth of those became unicorns before rewriting. It is quite likely that they were able to grow so much precisely because they chose Python. Google emails prior to acquisition happen to confirm that.
- seanhunter 4y agoCounterpoint: wanting to be hardcore is probably not a good reason to do something. If you want to learn rust/go/nim/haskell/whatever do that, and that is probably going to be worthwhile. Do it to learn more about programming, gain fresh perspective, pick up new skills, broaden your mind, any number of reasons. But don't do it to "be hardcore".
- ActorNightly 4y agoI guess Youtubes backend (which is written in Python) is not hardcore enough.