Abstraction Patterns for Cross Platform Development Using C++ - Al-Afiq Yeong - CppCon 2023

Sdílet
Vložit
  • čas přidán 24. 03. 2024
  • cppcon.org/
    ---
    Abstraction Patterns for Cross Platform Development Using C++ - Al-Afiq Yeong - CppCon 2023
    github.com/CppCon/CppCon2023
    Writing code that's intended to work across multiple platforms; be it hardware, graphics APIs, online storefronts or operating systems can be rather difficult. Many software engineers struggle when it comes to abstracting code especially junior engineers be it for a commercial software or a hobby project. To make matters worse, there's often not a lot of materials covering such as advance topic. This presentation aims to discuss several abstraction patterns that can be used to write cross platform code using the features and tools that C++ and operating system offers, from the bad to the good as well as the benefits and pitfalls of each method in terms of complexity, maintainability and performance. A case study of several cross-platform frameworks will also be included in the presentation. Hopefully this presentation will serve as a starting point and become the main reference for engineers across multiple experience levels across various industries when writing cross platform code.
    ---
    Al-Afiq Yeong
    Al-Afiq Yeong is a Software Engineer currently working in the Engine team at Criterion. His day to day involves performance monitoring games, making sure memory gets managed efficiently and developing new technologies that will empower future games developed with Frostbite. Prior to games, he was a full stack developer maintaining and building web apps in the service, nuclear and finance industry. Outside work, he spends most of his time writing his own rendering engine while trying to avoid the allure of the games sitting in his Steam library.
    ---
    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 #abstraction
  • Věda a technologie

Komentáře • 14

  • @younghsiang2509
    @younghsiang2509 Před měsícem

    Impressive talk !

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

    Very interesting talk. I learned things that I can actually use frequently

  • @chetanpandey8722
    @chetanpandey8722 Před 10 dny

    Great talk. But I was not able to understand the disadvantage that you discussed of PIMPL and handle, that is 2 definition for one declaration. Can someone explain that to me or point me to some article where I could read about this.

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

    26:37 Ivica’s talk: czcams.com/video/n6PvvE_tEPk/video.html

  • @mrlithium69
    @mrlithium69 Před 2 měsíci

    Good explanation of real concepts I need

  • @PaulMetalhero
    @PaulMetalhero Před 2 měsíci

    Man, I cannot wait for the final release of the SDL3 library!

  • @sqw33k
    @sqw33k Před 2 měsíci +4

    21:46 Why on earth would you use both #pragma once AND #ifndef?

    • @prouleau4440
      @prouleau4440 Před 2 měsíci +1

      My guess is:
      you want to be cross platform but not all compilers support "#pragma once". 😒

    • @synchronizx5459
      @synchronizx5459 Před 2 měsíci

      #pragma once is a "modern" way for header guard, but some old compiler can not recognize it. From the view of compilation performance, the modern compilers tend to avoid including those headers that have been included, while the old apporach is simply include then ignore the whole contents. I think using both of them is for the considration of compatibility, which is the topic of this talk.

    • @tejasgarhewal7509
      @tejasgarhewal7509 Před 2 měsíci +1

      ​@@synchronizx5459 are there any compilers though that recognise #pragma once but not #ifndef ? If none, then why bother with the pragma at all and stick to #ifndef if one cares about compatibility?

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

      how "#pragma once" works is implementation specific, #ifndef is not. This can be relevant when you have very complex build systems (particually distributed build systems), where #pragma once can sometimes cause issues due to implementation. If you're building all on your own machine or just your own code, 99.99% of the time it won't matter

  • @WakeUp4L1fe
    @WakeUp4L1fe Před 2 měsíci

    Why there are #pragma once AND #ifdef guards used at the same time?

  • @higaski
    @higaski Před 2 měsíci

    Good talk overall, but I think the comparisons are lacking at least one dimension. E.g. I'd argue #ifdef is perfectly fine if it's for a single line of code.