3 ms·
Go permits struct fields to be public. Ergo, Go doesn't care about enforcing the notion that field access violates encapsulation. It is up to the programmer to
by parenthephobia 9y ago
Go permits struct fields to be public. Ergo, Go doesn't care about enforcing the notion that field access violates encapsulation. It is up to the programmer to decide what is being encapsulated.