|
|
|
|
|
by aw1621107
4 days ago
|
|
Both those feel a bit like circular arguments? They need constructors because that's how they are currently defined, but that doesn't say anything about whether they could also be defined without constructors. 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.