C++: Pure vs Impure Functions
Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=JDs3mMsdnh0
While C++ is not a purely functional language, it can really help make your code easier to understand if you use the notion of function purity (from functional programming) to guide the design of your functions. By cutting down the dependencies of a function to just the input parameters of the function, then you can help eliminate the exponential complexity of sources of bugs that plague more complex systems, as well as enabling the compiler to do things like flag pure functions whose return values are dropped and turning on some optimizations.
Other Videos By Bill Kerney
2023-09-20 | Vectors Part 2 |
2023-09-20 | C++ File I/O |
2023-09-19 | UE5: Making a Monster |
2023-09-19 | UE5: 10 Minute Inventory System |
2023-09-18 | C++: Vectors Part 1 |
2023-09-15 | BRIDGES Lab Time |
2023-09-14 | UE5: Health and Stamina Systems |
2023-09-14 | Barycentric Coordinates |
2023-09-14 | Voronoi Part 2 - Floyd's Relaxation |
2023-09-13 | C++: Void Functions and Call By Reference Parameters |
2023-09-13 | C++: Pure vs Impure Functions |
2023-09-12 | UE5: Landscape Materials, Landscape Layers, Landscape Grass Output |
2023-09-12 | Voronoi Diagrams + the Inline and Static keywords in C++ |
2023-09-11 | C++: Random Numbers |
2023-09-07 | Game Design Day 2 |
2023-09-07 | Introduction to Dear ImGui |
2023-09-06 | C++ Functions |
2023-09-05 | Principles of Game Design |
2023-09-05 | Dynamic Materials |
2023-09-03 | The Difference Between G++ and Clang++ |
2023-09-01 | Enums and Switches - Peanut Butter and Jelly and Rye Bread |