C++ Member Functions vs Free Functions
https://www.danielsieger.com/blog/2023/05/01/cpp-member-vs-free-functions.html
@lupyuen
I used to ponder on these kind of questions, but in recent years I stopped to do that and I just write the code and change it latet if I need to.
As far as I can tell at the binary level the biggest difference is "thiscall" vs "cdecl" (unless it a virtual function).
Its mostly question about text aesthetic (which is subjective) and encapsulation (which I tend to avoid by default).
Its fun to discuss and think about these things, just don't let it cause you analysis paralysis.
CleverLibre Social is an inclusive social instance for open discussion, learning, and community. All cultures welcome. Hate speech and harassment strictly forbidden.
@lupyuen
I used to ponder on these kind of questions, but in recent years I stopped to do that and I just write the code and change it latet if I need to.
As far as I can tell at the binary level the biggest difference is "thiscall" vs "cdecl" (unless it a virtual function).
Its mostly question about text aesthetic (which is subjective) and encapsulation (which I tend to avoid by default).
Its fun to discuss and think about these things, just don't let it cause you analysis paralysis.