by gugagore · 3y ago · 0 comments
This is most clearly seen with conversation functions between types defined in different libraries. A collection class might have a method like "from_Array".
I recently wondered why Casey Muratori (RAD Game tools, Handmade Hero etc.) seems to write C++ in a very C like fashion plus a few select features.
Here's a discussion: https://hero.handmade.network/forums/code-discussion/t/453-w...
One of the takeaways is that he prefers the simplicity of C but uses operator overloading for similar reasons as you describe. One example includes addition of vectors, which is certainly a thing you do often in game and graphics related code.