3 ms·
I think there’s some misunderstanding between the two of you. Reflection is indeed the sane and convenient solution for working with structures when type is no
by ivan_gammel 4y ago
I think there’s some misunderstanding between the two of you. Reflection is indeed the sane and convenient solution for working with structures when type is not known at compile time (e.g. general purpose library for DI, ORM, security or serialization). It’s definitely not the way to manipulate object trees when type is known in compile type.
However the point about complexity is valid: is it really worth patching strongly coupled solution violating SRP and breaking encapsulation with some design pattern for an anti-pattern (setters)?