On Saturday, 19 November 2022 at 09:51:09 UTC, []() {}() wrote:
...
no. in C# it breaks ABI. that is why its not acceptable in my team.


of course that's not the reason we don't use public member variables in classes.

the reason we don't use them, is because (1) we always anticpiate change including the need to implement (and change) business rules associated with the objects data (using setter/getters), and (2) we always prioritise the stability of the public interface of a class at the time of design.

if neither of those are your concern, in production-level code, I'd be really surprised (and shocked).

Reply via email to