3 ms·
The idea in D is to make the following unnecessary: struct S { int m_field; int field() { return m_field; } void field(int c) { m_f
by WalterBright 3y ago
The idea in D is to make the following unnecessary:
struct S {
int m_field;
int field() { return m_field; }
void field(int c) { m_field = x; }
}
just to future proof the field access. Don't bother with the access functions until they are actually needed.