There is a way to make a protected method callable from a derived class but overridable by making it FINAL.
Is there a way to do the opposite?
I.e. make a method overridable, but not callable by a derived class.
An example could be a protected abstract method that only the base class should call in a specific order or scenario.
The derived class is allowed or obliged to provide an implementation, but should never directly call the method.
It seems something like this is possible in c++ using "private virtual".
I was wondering if any construct in ABL could mimic this...
See https://stackoverflow.com/questions/414746/override-but-dont-call and https://stackoverflow.com/questions/29412477/java-method-only-callable-by-superclass
Sure, I gave the original problem another thought and in this case think I found a cleaner solution.
Nevertheless, I thought it was worth starting a discussion...
One other solution we thought off (but became redundant because of the refactoring) was to move the implementation of the method to another class (strategy pattern), and have that injected into the base class (composition!).
Architect of the SmartComponent Library and WinKit
Not that important, but delegates are not OO according to others. You find them in functional languages and multi-paradigm languages. "One example is C#, which includes imperative and object-oriented paradigms, together with a certain level of support for functional programming with features like delegates (allowing functions to be treated as first-order objects)"
Not wanting to hijack anything and going off-topic ;-) but
"Probably you will be surprised how similar functional and OO code is, and that most ideas are things you already know."