Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C++ is probably the only language that needs a strong style guide, to define a subset you are allowed to use in the project.

Linus Torwalds famously said that subset is zero. You're not allowed to use C++ in Linux, a wise move.

Here's Google's: https://google.github.io/styleguide/cppguide.html Search for "do not use" and you'll find plenty of hits.



> C++ is probably the only language that needs a strong style guide,

here you go: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines


Good Lord.

Reminds me of Good Parts, Bad Parts meme of JS.


And it's not because he's cranky or something, he was holding out for something worthy to possibly use instead of C. Turned out to be Rust.


> And it's not because he's cranky or something, he was holding out for something worthy to possibly use instead of C.

Good point.

> Turned out to be Rust.

He was evaluating C++ in the 90's, you make it sound like he recently decided to write Rust instead of C. The reality is that Rust is allowed in limited ways into _some parts_ of the kernel codebase. Rust got so much further than C++ ever did, that is true.


Java, Python, C#, Common Lisp, Perl, also deserve guides.

The home page of that link isn't only for C++.


Perl is another example. It has a dedicated linter to detect the myriad ways of using it wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: