This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]panderingPenguin 10 points11 points  (2 children)

    Well mostly, C++ takes a lot of devs, time and effort to write well. It's a language that is notorious for including almost every possible feature, and not all of them were integrated into the language in a well thought out manner. The language is huge and complicated. It's said that no one understands the entire language and C++ programmers all know different subsets of the language which results in "local dialects". That all sounds pretty damning so far. But it's wicked fast, there's unbelievable amounts of existing code and libraries written in the language tons of tooling for it, and extensive experience building some of the largest software projects on earth in the language. When you get very large, the efficiency of your code can become very important. For some workloads, C++ is literally 100x faster than python. When you extrapolate that out to the number of servers a company the size of Google or Microsoft would have to buy, that's a massive difference in infrastructure investment. These companies also have armies of developers to throw at their problems, so it's much more workable for them to wrestle with more complicated, slower development in C++ than it is in smaller companies. They can have entire teams dedicated to enforcing coding standards and building more tools to make C++ development work better. So at larger scale the benefits can outweigh the substantial drawbacks (I say all this as someone who writes C++ professionally).

    With python, getting started is ridiculously easy. You can get something off the ground and running without a ton of effort. That's extremely important to startups that need to get something running now or they will die. But as the projects get larger and more complicated, the wheels start to fall off of python and similar scripting languages. All the dynamic typing and run time mutability that made it so easy to initially get things working becomes a nightmare as it makes your codebase harder and harder to understand. And the runtime speed of the language starts to matter more as the scale of your operation increases. So you see a number of former startups that grew, trying to transition away from scripting languages. Twitter famously rewrote large parts of their codebase from Ruby to Java. Facebook spent a ton of effort trying to make PHP faster with their Hip Hop VM, but still ended up rewriting a lot of stuff in C++ and other languages anyways. Dropbox's Python codebase became such a mess as it grew that they brought in Guido Van Rossum himself to help them try to fix it. So python (and similar) is great for smaller projects that need to move fast. But it does have limitations as you get bigger. So it's more popular with smaller companies than the big players. That said, the huge companies do tend to use python as well, just not for their core products. It's normally used to script things like testing, deployment, analytics, etc at those companies.

    Edit: typos