3 ms·
Sure. But realizing that objects are just structs with function pointers takes you from a binary "this code uses objects" vs. "this code doesn't use objects" t
by cperciva 10y ago
Sure. But realizing that objects are just structs with function pointers takes you from a binary "this code uses objects" vs. "this code doesn't use objects" to a more flexible "this code is designed in a more objecty way than that code".
A lot of people think about objects as a language feature, when they're really a design paradigm; and like all good design paradigms, you can use more or less of them depending on how well the paradigm fits a particular piece of code.
- lacampbell 10y agoTo an extent - with the caveat that there are entire languages built around this design paradigm, such that using objects is the syntactic past of least resistance. I agree though, when I dabble in C I often end up writing objecty code. Sometimes it's even a bit functional..