by Night_Thastus
6 subcomments
- Nothing particularly notable here. A lot of it seems to be 'We have something in-house designed for our use cases, use that instead of the standard lib equivalent'.
The rest looks very reasonable, like avoiding locale-hell.
Some of it is likely options that sand rough edges off of the standard lib, which is reasonable.
by bengoodger
0 subcomment
- Seeing the comments here talking about ancient codebases got me wistful for when Chromium was new and everything seemed possible.
That triggered a flash of feeling extremely old realizing we broke ground on this codebase 20 years ago this year!
by Panzerschrek
1 subcomments
- <regex> [banned]
A good decision. I tried to use it once and realized that it can't even work with UTF-8 properly. It's a mystery for me how such flawed design was standardized at all.
- There are yet more interesting docs in the parent directory :)
https://chromium.googlesource.com/chromium/src/+/main/styleg...
- Exceptions are banned, but an exception is made for Windows.
- This list is longer than the features in all of C I feel like at first glance. Wow that is overwhelming.
by Tempest1981
3 subcomments
- Where does it list the preferred alternatives to banned features?
For example:
> The <filesystem> header, which does not have sufficient support for testing, and suffers from inherent security vulnerabilities.
- Good call on those u8"..." literals.
Source code should all be UTF-8 natively, letting you directly write UTF-8 text between quotes.
Exactly their rationale.
These literals are a solution in search of a problem ... which is real but has a much better solution.
by WalterBright
1 subcomments
- Modules are banned - they should have just copied D modules.
by dfajgljsldkjag
3 subcomments
- The banned list proves that context matters more than having the newest tools. These features work well for small apps but they cause problems in a project this size.
- Is there a way to make this formal, like in the code, making the compiler complain when you try to use these features?
by GnarfGnarf
1 subcomments
- I thought User-Defined Literals were a great idea until I saw all the pitfalls listed in the Google style document. Dangerous indeed.
by weinzierl
3 subcomments
- I'd curious about the banned Rust features. Surely, Rust has at lot fewer foot guns, but it isn't that there aren't any.
by lateforwork
9 subcomments
- You almost never see a list of banned Java features (or even banned C# features). On the other hand any serious C++ development team is going to have a list of banned features. Java eliminated the features that you would want to ban.
- It's remarkable to me how many codebases ban exceptions and yet, somehow, people still insist they're good.
by nixosbestos
0 subcomment
- Rust is too complicated!!11 Ooops wrong thread.
- C++ itself should be forever banned
by einpoklum
3 subcomments
- Since Chromium stopped allowing manifest-v2 extensions, i.e. significantly crippled what extensions can do and made it impossible to use some key extensions like uBlock Origin, I've decided to avoid it.
Anyway, about these C++ conventions - to each software house its own I guess. I don't think banning exceptions altogether is appropriate; and I don't see the great benefit of using abseil (but feel free to convince me it's really that good.)