Closed larshp closed 1 year ago
Agree!
I agree, even though (this holds true for the referenced section on instance variables as well)
[...] is a potential source of confusion [...]
feels like a rather soft and/or incomplete argument to me.
I would prefer to actually name the confusion (the accessed type not being instance-specific/dependent) and possibly argue that refactoring of the instance variable [name] would misleadingly touch a piece of code that is unrelated to the type definition.
@larshp Would you like to open a PR yourself?
Merged with #305
For a section in the guide suggest adding "Don't access TYPES through instance variables"
Background: same story as https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-call-static-methods-through-instance-variables
anti pattern example,
instead do,
any thoughts/comments?