3 ms·
The Google style guide developed over time through iterations involving several thousand programmers. It's the culmination of all those programmers and operatio
by sys_64738 8y ago
The Google style guide developed over time through iterations involving several thousand programmers. It's the culmination of all those programmers and operational aspects which got it to this point. So when you say it's 'opinionated', the data has said the styling in the document is the right thing to do.
- CoolGuySteve 8y agoThat's a funny way of putting it, almost like an appeal to tradition. It reads more like Google had to herd a lot of junior programmers and rather than teaching better judgement or patterns, just walled off huge sections of the language completely.
- zawerf 8y agoIs there any other way at google scale? I haven't written more than 100k LOC of C++ and yet there are already lots of code (mostly template meta programming) that I wrote that even I can't read anymore. Now imagine blowing that up to (literally) billions of lines of C++ written by overly clever engineers all eager to prove themselves.
- CoolGuySteve 8y agoQuite a few things: - Allow whatever C++ inside the project but force each project to export a plain C API and .so file. This has the quadruple bonus of (1) avoiding ABI problems between compilers, (2) hiding complexity from other teams, (3) forcing teams to think more about their APIs, and (4) being trivially callable from any other language. - Large API/SPI review mailing lists. This worked quite well at Apple. - Add a section to the style guide about what's appropriate template use and what's not. Banning one of the language's most important features is just a cop out. - Better mentorship from senior engineers.