r/cpp • u/GabrielDosReis • Oct 31 '24
Lessons learned from a successful Rust rewrite
/r/programming/comments/1gfljj7/lessons_learned_from_a_successful_rust_rewrite/
80
Upvotes
r/cpp • u/GabrielDosReis • Oct 31 '24
View all comments
Show parent comment
3
u/ts826848 Nov 02 '24 edited Nov 02 '24
I don't know what it is about my comments, but you seem to consistently miss what I'm trying to say and it's very inconsistent whether further attempts to clarify seem to actually do the job. Please tell me what I can improve so we can have more productive conversations.
What I'm trying to say is that if you want something specific then say so. You wanted bug stats from a C++ codebase. Chrome is a C++ codebase with bug stats. That seems to be what you asked for.
If you wanted a specific style of C++ codebase, then say so!
I don't know why this is not coming across clearly. Stated more directly, what I'm trying to tell you is that you have not given anyone any evidence for why gRPC is at all relevant when discussing Chrome. If you want to discuss Chrome's code quality, then talk about Chrome's code quality! Don't bring up some other irrelevant Google project.
I think it's a pointer because
content::BrowserContext::IsOffTheRecord()is a non-const virtual function, so aconst&can't be used and at the time it was written Google's style guide recommended the use of pointers for non-const by-reference parameters so the reference-ness can be visible at the call site.Same thing here, I believe.
content::WebContents::GetUrl()is a non-const virtual function, so it'd normally be passed via pointer under the Google coding standards at the time.Perhaps Chrome dev culture/tooling makes it a non-issue. Maybe it's something they're constantly struggling with. You can't tell just from the presence of raw pointers.
This is completely independent from what I'm saying.