Lightning Talk: The Most Important C++ Feature - Nicolai Josuttis - ACCU 2023

Sdílet
Vložit
  • čas přidán 14. 09. 2023
  • ACCU Membership: tinyurl.com/ydnfkcyn
    accu.org
    www.accuconference.org/
    Lightning Talk: The Most Important C++ Feature - Nicolai Josuttis - ACCU 2023
    Slides: accu.org/conf-previous/accu2023/
    A talk on the value of destructors and the RAII pattern.
    ---
    Nicolai Josuttis
    Nicolai M. Josuttis (www.josuttis.com) is well known in the programming community for his authoritative books and talks. For more than 20 years he is a member of the C++ Standard Committee. He is the (co-)author of several worldwide best-sellers, including
    "C++20 - The Complete Guide",
    "C++17 - The Complete Guide",
    "C++ Move Semantics",
    "C++ Templates" (with David Vandevoorde and Doug Gregor), and
    "The C++ Standard Library".
    ---
    CZcams Videos Filmed, Edited & Optimised by Digital Medium: events.digital-medium.co.uk
    #accuconf #programming #destructor
  • Věda a technologie

Komentáře • 8

  • @tomaszstanislawski457
    @tomaszstanislawski457 Před 8 měsíci

    I agree that C could benefit from some form of *explicit* and *optional* RAII, there is even a proposal to add "defer" statement to address this issue.

  • @iamjadedhobo
    @iamjadedhobo Před 8 měsíci +1

    I fully agree with Nicolai.
    When I had to do some coding in C# (when it was just new) deterministic destruction/cleanup/closing of a resource was *the major* thing I was missing. Having to go back to resorting to C idioms was just painful.

  • @roykin0929
    @roykin0929 Před 8 měsíci +2

    Thumbnail spoiled it, but I agree 100%

  • @codertopics343
    @codertopics343 Před 8 měsíci +1

    I agree 100% :)

  • @segfault4568
    @segfault4568 Před 8 měsíci

    when templates and constexpr showed up I was like YAY these are the ones, turns out its a destructor.

  • @tylovset
    @tylovset Před 8 měsíci +4

    RAII was already in C, though.
    #define RAII(declvar, destruct) for (declvar, ***_i, **_ip = &_i; _ip; _ip = 0, destruct)
    RAII (FILE* f = fopen(name, "r"), fclose(f))
    {
    if (!f) return ERROR;
    ...
    if (done) continue;
    ...
    } // end of f's lifetime

  • @Vitorian
    @Vitorian Před 8 měsíci +2

    Taboo: everyone secretly hates move semantics.