Back to Basics: Functions in C++ - Mike Shah - CppCon 2023

Sdílet
Vložit
  • čas přidán 4. 06. 2024
  • cppcon.org/
    ---
    Back to Basics: Functions in C++ - Mike Shah - CppCon 2023
    github.com/CppCon/CppCon2023
    Functions are one of the first things programmers learn, granting you the ultimate power to 'resuse' code and build modular programs. In this talk, we are going to provide an overview of functions from the start to the end, on the various powers that are given to us from the ground up. Consider this talk your one stop for learning all of the great things about functions!
    We'll start with a basic function example, identifying the function signature and basic abilities of a function. Then we are going to view this function again from the perspective of assembly (using compiler explorer) to show you how a function is structured. From the assembly view, we will then observe that functions have addresses (they must after all!) and that we can store functions in pointers. We'll take a brief aside to show you how modern C++ also gives us the convenient std::function. Functions need not always be 'global' building blocks of our programs, the next step in our journey will be to see how we can have functions at local scope (e.g. lambda's) and how they can be used (and often times in handy ways in the STL). Ah, intrigued are you? We're not quite done! Now with building blocks such as lambda's (and related functors) we can utilize function composition to really unlock the power of functions. Towards the end of this talk, we will talk about grouping related functions (into namespaces) and as member functions in classes. Within our discussion of functions in classes, we'll touch on virtual functions, static functions, and operator overloading. We'll circle back to where we began on these topics, again showing you the assembly. At the end of this talk, you will have had FUN with functions (I couldn't resist...but you will see the complete C++ picture of functions).
    ---
    Mike Shah
    Mike Shah is an Associate Teaching Professor at Northeastern University in the Khoury College of Computer Sciences. His primary teaching interests are in computer systems, computer graphics, and software engineering. His research interests are related to performance engineering (dynamic analysis), software visualization, and computer graphics. Along with teaching and research work, he have juggled occasional consulting work as a 3D Senior Graphics Engineer in C++. Mike enjoys creating programming content at / mikeshah .
    __
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
    CZcams Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
    ---
    Registration for CppCon: cppcon.org/registration/
    #cppcon #cppprogramming #cpp
  • Věda a technologie

Komentáře • 7

  • @amber1862
    @amber1862 Před 5 měsíci +6

    Highly recommend Mike’s CZcams channel. He doesn’t shy away from the deeper stuff and keeps things fun and approachable. Fantastic educator.

    • @MikeShah
      @MikeShah Před 5 měsíci +2

      Thank you for the kind words! 🙂

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

    Great Explanation Skill👍

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

    Huskies!

  • @hamids4550
    @hamids4550 Před 5 měsíci

    he really like to use the word "again" :D