MENU

Fun & Interesting

Modernizing Finite State Machines in C++ - Empower Simplicity & Boost Performance With std::variant

CppNow 4,953 4 months ago
Video Not Working? Fix It Now

https://www.cppnow.org --- Modernizing Finite State Machines Implementation in C++ - Empower Simplicity and Boost Performance With std::variant - Amandeep Chawla - C++Now 2024 --- Finite State Machines (FSMs) are fundamental tools in computer science for modeling behavior in various systems, from software applications to hardware controllers. Traditionally, implementing FSMs in C++ involved using multiple inheritance hierarchies for representing states, events and actions along with heap-allocated objects. However, with the introduction of std::variant in modern C++, there is a compelling opportunity to revolutionize FSM design, offering simplicity, type safety, and performance improvements. In this talk, we explore how leveraging std::variant transforms FSM implementation, allowing for a more intuitive representation of states and transitions. By embracing variant-based FSMs, developers can streamline code, enhance readability, and mitigate common pitfalls associated with traditional FSM designs. Furthermore, we delve into performance considerations and showcase how std::variant facilitates efficient state management, removing need for heap allocation at all. Attendees will gain insights into the principles of FSM design, understand the benefits of adopting std::variant for FSM implementation, and learn practical strategies for incorporating modernized FSMs into their C++ projects. Whether you're a seasoned C++ developer seeking to simplify FSMs or a newcomer exploring advanced language features, this talk offers valuable perspectives on harnessing the power of std::variant to elevate FSM development to new heights. --- Slides: https://github.com/boostcon/cppnow_presentations_2024/blob/main/Presentations/Modernizing_Finite_State_Machines_Implementation.pdf --- Amandeep Chawla Amandeep Chawla is a seasoned software engineer with over 20 years of experience in C++. Since graduating in 2002, he has been actively working with C++ throughout his career. In his early years, Amandeep specialized in embedded systems, where he utilized a small subset of C++. This foundational experience provided him with a deep understanding of low-level programming and resource-constrained environments. In 2006, Amandeep joined Adobe, where he has held various roles over the past 17 years. Throughout his tenure at Adobe, he has been extensively involved in projects that heavily rely on C++. As a Senior Computer Scientist - II, Amandeep is currently a valued member of the core team responsible for Adobe CC Libraries. His contributions to the team involve leveraging C++ to develop robust and cross-platform solutions. With his extensive experience in C++, Amandeep has gained valuable insights into the language's strengths, limitations, and best practices. He has a deep appreciation for tackling complex challenges and finding innovative solutions to optimize performance, maintainability, and cross-platform compatibility. --- C++Now 2025 - 28th April - 2nd May C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world. Annual CppNow Conference - https://www.cppnow.org https://www.linkedin.com/company/cppnow https://twitter.com/cppnow https://www.facebook.com/CppNow https://www.reddit.com/r/CppNow https://mastodon.social/@cppnow Video Sponsors: millennium and think-cell --- Videos Filmed & Edited By Bash Films: https://bashfilms.com/ YouTube Channel Managed & Optimized By Digital Medium Ltd: https://events.digital-medium.co.uk --- #boost #cpp #cppprogramming #softwareengineering #cplusplusprogramming

Comment