Typical C++, But Why? - Björn Fahller - CppNorth 2023

Sdílet
Vložit
  • čas přidán 29. 09. 2023
  • www.cppnorth.ca​
    ---
    Typical C++: Guide to the C++ Type System - Björn Fahller - CppNorth 2023
    The C++ type system is both very weak and very strong. In this presentation I will show you how using the strengths of the type system makes your code better. I will show you how types...
    - prevents incorrect code from compiling
    - improves readability of code
    - reduces the risks when changing code
    and I will show you how very simple changes to your code will take you far in the desired direction.
    ---
    Slides: github.com/CppNorth/CppNorth_...
    Sponsored By:
    think-cell: www.think-cell.com/cppnorth
    JetBrains: www.jetbrains.com/
    ---
    Björn Fahller
    Björn Fahller is a senior developer at Net Insight, where he is currently coordinating the technical work of teams developing electronics, FPGA, embedded software, distributed control systems and web applications. He is keen on improving the skills of the teams he works in, by learning, and by sharing knowledge. Björn has worked full time with software development since 1994, mostly for networking products, and primarily in C++. He has also created the popular open source C++ libraries, Trompeloeil for mocking, and strong_type for type safety.
    ---
    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 #cppprogramming
  • Věda a technologie

Komentáře • 7

  • @sanjaygatne1424
    @sanjaygatne1424 Před 7 měsíci

    Nice talk.

  • @akmanu07
    @akmanu07 Před 6 měsíci

    41:33 wouldn’t overloading the close_session function just reintroduce the problem which we are trying to solve by using enum classes?
    Before using enum-> pass the wrong value, underlying type is int-> wrong item gets erased.
    After using enum + overload -> pass the wrong value, overloaded function gets called, wrong item gets erased, unless we have different implementations for each of the overloaded functions

  • @hijarian
    @hijarian Před 6 měsíci

    First solution is a boxing - it's working, for sure, but it have costs, isn't it? Or the compiler can somehow strip away everything except the wrapped string inside the struct?🤔

  • @ultradude5410
    @ultradude5410 Před 7 měsíci +1

    Is this a reupload? I swear I've seen the jigsaw puzzles before.

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

    Yes, with a lot of hoops and tricks you can start reimplementing features of Rust in your C++ code. Or you can just do the logical step and switch to Rust. What the industy is doing anywhay.

  • @peregrin71
    @peregrin71 Před 7 měsíci

    The same argument you use for not using std::span also applies to std::pair, and std::tuple these kind of classes lack semantics and indeed should not be used on API's.