Is defining get/set methods for every field overkill?
Andrey Zherikov
andrey.zherikov at gmail.com
Sat Nov 19 09:16:59 UTC 2022
On Saturday, 19 November 2022 at 09:05:42 UTC, []() {}() wrote:
> Once you refactor your class (creating actual private member
> variables and creating getter/setter methods, you are almost
> certainly going to break binary compatability, and when you
> send your update compiler library to your customer, there code
> will stop working - cause they'll have to recompile it against
> the new library.
I think you are speaking about shipping dynamic library to users.
I think compiler authors can clarify whether introducing
getters/setters breaks ABI or not. On the other side if it breaks
then it can be easily checked: create simple program that uses
dynamic library, then change the latter to use getters/setters
and run program again without recompiling.
More information about the Digitalmars-d-learn
mailing list