8 ms·
You realize with any modern C++ developer, they can program basically the same stuff, in the same number of lines modulo 4 lines of #includes? #include <nu
by codemac 6y ago
You realize with any modern C++ developer, they can program basically the same stuff, in the same number of lines modulo 4 lines of #includes?
#include <numeric>
#include <iostream>
#include <chrono>
#include <vector>
int main(int argc, char** argv) {
for (int i = 0; i < 15; i++) {
std::vector<int> result;
auto start = std::chrono::system_clock::now();
for (int j = 0; j < 3000; j++) {
result.push_back(i);
}
auto sum = std::accumulate(result.begin(), result.end(), 0);
auto end = std::chrono::system_clock::now();
std::cout << (end - start).count() << " " << sum << std::endl;
}
}
I think you underestimate what a multiple decades of coding 40hrs a week gives you in terms of development speed.
- deleted 6y ago[deleted]
- flipgimble 6y agoyou may have replied to the wrong thread. But I'd like to point out that while Google has some of the top C++ experts working for them, is heavily involved in C++ standardization and compiler writing process, in 2016 they claimed to have 2 billion lines of C++ running their infrastructure... .. and yet they don't suffer from familiarity bias or the sunken cost fallacy I hear in your comment. Instead Google C++ developers are sounding an alarm over the future direction the language and its crippling complexity: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2137r0.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p213...
- pjmlp 6y agoGoogle is also known for having brain dead guidelines for C++, that speak against community best practices. Just like with Go, their monorepo and internal tooling deturps the understanding how everyone else actually uses C++.