2 ms·
Yep. This whole discussion just seems like a C vs C++ styleguide slapfight. Having the functions that operate on the struct attached directly to the struct de
by paulmd 7y ago
Yep. This whole discussion just seems like a C vs C++ styleguide slapfight.
Having the functions that operate on the struct attached directly to the struct declaration, vs having some functions that the first parameter is the struct on which the function operates, doesn't seem like a particularly meaningful distinction to me. OK, you like C-style programming in favor of C++-style programming, congrats. It's still a class either way.
- deleted 7y ago[deleted]
- damnyou 7y agoThe distinction you describe is not meaningful, but the key feature that separates classes from other forms of code organization/polymorphism, like typeclasses as in Haskell/Rust, is not that. It is inheritance.