Soliciting feedback for C++ portions of Chromium University

73 views
Skip to first unread message

Daniel Cheng

unread,
Aug 18, 2025, 1:56:28 PMAug 18
to cxx, Chris Blume
Hello all,

There are two talks about C++ in Chromium University (well, there's actually only one in the playlist, but as far as I can tell, the slides and videos for both are public).

Through a series of events, I ended up with the task of updating them this year. I made a few minor updates to the slides for C++ as a Second Language, but C++ Memory is unchanged. However, I wanted to get some broader community input/perspective on the slides. If you have ideas or feedback on the slides (or are interested in curating this content in the long-term), please do contribute or let me know.

Some particular topics I'm wondering:
- are there topics that should be covered but aren't?
- should the slides be more Chromium-specific? They are currently fairly generic for the most part; there are some references to Chromium-specific guidelines but not many. The slides occasionally cover topics that should be rarely-used in Chromium (e.g. bare `new` and `delete`)
- should there be a followup talk that's more focused on Chrome development specifically, e.g. raw_ptr<T>, base::OnceCallback, base::TaskRunner?
- what about Blink/Oilpan? (This feels complex enough that maybe it should be its own thing)
- are there topics that shouldn't be covered/would be better scoped to a separate presentation/session?

Feel free to reply here, or in comments on the slides. Thanks!

Daniel

David Benjamin

unread,
Aug 18, 2025, 3:36:22 PMAug 18
to Daniel Cheng, cxx, Chris Blume
Not sure the context of the slides, but some of the examples don't quite match Chromium and Google C++ style. (ComputeHarmony.cpp and ComputeHarmony.h instead of compute_harmony.cc and compute_harmony.h.) If they're meant to be for Chromium style projects, probably worth aligning in style. If they're meant for other contexts, ignore me. :-)

--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKqPsc98sS4uubZuZXKzW%2BexfwS5ZQUwrg2g16bjFg3v-A%40mail.gmail.com.

Gabriel Charette

unread,
Aug 18, 2025, 5:18:57 PMAug 18
to Daniel Cheng, cxx, Chris Blume


Le lun. 18 août 2025, 13 h 56, Daniel Cheng <dch...@chromium.org> a écrit :
Hello all,

There are two talks about C++ in Chromium University (well, there's actually only one in the playlist, but as far as I can tell, the slides and videos for both are public).

Through a series of events, I ended up with the task of updating them this year. I made a few minor updates to the slides for C++ as a Second Language, but C++ Memory is unchanged. However, I wanted to get some broader community input/perspective on the slides. If you have ideas or feedback on the slides (or are interested in curating this content in the long-term), please do contribute or let me know.

Some particular topics I'm wondering:
- are there topics that should be covered but aren't?
- should the slides be more Chromium-specific? They are currently fairly generic for the most part; there are some references to Chromium-specific guidelines but not many. The slides occasionally cover topics that should be rarely-used in Chromium (e.g. bare `new` and `delete`)
- should there be a followup talk that's more focused on Chrome development specifically, e.g. raw_ptr<T>, base::OnceCallback, base::TaskRunner?

"Life of a Process" touches on those topic a bit.


- what about Blink/Oilpan? (This feels complex enough that maybe it should be its own thing)
- are there topics that shouldn't be covered/would be better scoped to a separate presentation/session?

Feel free to reply here, or in comments on the slides. Thanks!

Daniel

--

Daniel Cheng

unread,
Aug 18, 2025, 5:24:05 PMAug 18
to David Benjamin, cxx, Chris Blume
I've tried to update things to match Chrome style where possible. I'll fix that one as well.

Daniel

Chris Blume

unread,
Aug 18, 2025, 5:32:34 PMAug 18
to Gabriel Charette, Daniel Cheng, cxx
Oh hi!
I recognize those slides. ;D

1.) Do whatever you want with them.
2.) When I originally checked for feedback, there were comments to cover Chromium things (Blink/Oilpan, base::OnceCallback).
3.) I designed the talks to be more general C++ and understanding so the other pieces (like Chromium-specific things) could "click" more easily. FWIW, people were still absorbing the shift to C++11 then. Feel free to adjust based on your desires/understanding of the audience. (See #1)
4.) I got feedback that the RAII sections (both construction and destruction) were not clear. If you're going to make changes, you might want to consider revisiting that section as well.
5.) The playlist linked is when we presented from home due to COVID. I had just moved into a house and my setup was terrible. The playlist from a previous year would be a better reference for how to present the material.

Nico Weber

unread,
Aug 19, 2025, 2:25:57 AMAug 19
to Daniel Cheng, cxx, Chris Blume
Maybe worth mentioning libc++ hardening, UNSAFE_TODO, etc?

--

Roland Bock

unread,
Aug 19, 2025, 3:59:25 AMAug 19
to Nico Weber, Daniel Cheng, cxx, Chris Blume
Hi,

Some thoughts:

C++ Memory
  • Slide 6 "C++ is extremely low level.".
    I would probably say something like "C++ provides extremely low level controls if and when you need them".

Second language:
  • Free functions
    • The first sentence in the whole deck is "Pure object orientation doesn’t make sense for all cases."
      While I agree, to me that kinda validates typical biases against C++: Even the opening statement is weird and definitely made for experts only.
    • Starting with a classic "Hello world" example would avoid this odd start: Everybody knows "hello world", they feel at home. And behold: There is a free function (main) and an object (std::cout) and operator<< (overloading) and an include directive.
      All present in an example that everybody knows from their previous languages.
  • I would drop most references to Java (partly because I came from C, perl, php, and a few other languages, but also because it seems more important to refer to the respective concepts like garbage collection)
  • Slide 21: I would rename the DestructorExample. It looks like this is a special thing. But every class and object has a destructor. And if you don't write one, the compiler will generate it for you. both pieces are crucial IMO (every and auto-generated)
Cheers,
Roland



--
--

Roland Bock

Software Engineering Manager

rb...@google.com


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.

Reply all
Reply to author
Forward
0 new messages