Writing C++ to Be Read - Vincent Zalzal - CppNorth 2023

Sdílet
Vložit
  • čas přidán 7. 10. 2023
  • www.cppnorth.ca​
    ---
    Writing C++ to Be Read - Vincent Zalzal - CppNorth 2023
    Most developers spend more time reading code than writing code, and teams include developers with varying levels of C++ proficiency. This talk is a collection of advice on how to write simple code that states your intent clearly so that both you and your coworkers can understand it and maintain it.
    I'll show how following the rule of zero and using aggregates can lead to code that is simpler, shorter, and easier to get right, by leveraging the code the compiler writes for you. I'll demonstrate a compelling use case for designated initializers. Learn how to form a common understanding among your coworkers using vocabulary types like optional and span. I'll also summarize the C++ Core Guidelines recommendations on how to choose appropriate parameter types in function signatures to clarify meaning, mutability, and ownership, including at the call site.
    Presenting these tips as part of an onboarding process should help everyone in your team contribute to a cohesive and maintainable codebase.
    ---
    Slides: github.com/CppNorth/CppNorth_...
    Sponsored By:
    think-cell: www.think-cell.com/cppnorth
    JetBrains: www.jetbrains.com/
    ---
    Vincent Zalzal
    Vincent Zalzal is a software developer with 15 years of experience in the computer vision industry. Vincent enjoys writing efficient, modern C++ to solve all kinds of math-oriented problems, especially those involving linear algebra, geometry or statistics. He likes the low-level aspects of optimizing memory access patterns as much as the high-level challenges of writing simple and maintainable code. He has an insatiable curiosity for learning about language features, programming idioms, good practices and random math facts.
    ---
    CppNorth is an annual C++ conference held in Toronto, Canada.
    - Annual CppNorth C++ conference: cppnorth.ca/
    - CppNorth Twitter: / cppnorth
    ---
    CZcams Videos Edited & Optimised by Digital Medium: events.digital-medium.co.uk
    #cppnorth #cpp #coding
  • Věda a technologie

Komentáře • 6

  • @PUZO37RS
    @PUZO37RS Před 5 měsíci +1

    Quite interesting to listen. Very neat speech. Thanks!

  • @ShadowRadiance
    @ShadowRadiance Před 6 měsíci +2

    Great presentation! I especially liked the reminder about when to use smart pointers.

  • @szaszm_
    @szaszm_ Před 6 měsíci +1

    There was a some discussion in the live chat about recommendations to use std::span vs not use it in parameters. The last talk I remember watching that recommended against using it was "Typical C++, but Why? - Björn Fahller - C++ on Sea 2023", at 26:00. I even left a comment there to question this recommendation.

  • @South_Wall
    @South_Wall Před 26 dny

    Vincent looks like average NPC from Dishnored game. Thanks for the lecture

  • @ABaumstumpf
    @ABaumstumpf Před 6 měsíci +1

    26:20 I don't understand why when talking about designated initializers people always bring up unrelated languages like Python when C++ got it from a very specific place: C99
    Not only does that have designated initializers but in a way more powerful way. The members can be used in any order and can be used multiple time. And while i am no fan of macro-magic (and it is by no means worse than template-voovoo) it even allows you to basically get named-parameters for arbitrary functions.