by pjmlp · 1w ago · 0 comments
The latter was what I was interested in, and I apologize for not making that clear. For instance, in Rust terms both those seem replaceable in principle via calls to appropriate trait functions like Default::default() or From::from().
Which is why the only difference between a struct and a class, is the default access method.
Thus that C file could be made extensible in C++, with zero code changes on the call sites.
The question is, at least for me, do you really miss out on anything by not having an ability to do so? I think you miss anything, but you gain a lot.