2 ms·
I prefer to make the implementation package-private and hide it behind an interface if there's no way to make the implementation's zero value useful. Doing so
by dpifke 4y ago
I prefer to make the implementation package-private and hide it behind an interface if there's no way to make the implementation's zero value useful. Doing so prevents someone from trying to use it without calling the (mandatory) constructor.