News for hackers. Stuff that matters.
Re:Implementing UFCS for C++ in Clang by 1ris on Monday August 03, 2020 @03:04PM (#24041949)
Too much inheritance is widely considered bad OOP. Cross component inheritance is considered a non-non for some. (e.g. inheriting from QValueList<T>). Most OOP languages offer a "sealed" of some kind to prevent inheritance because of this.

Also these functions do not have access to private or protected fields.

It's a way to argument a existing API for your use case without too thight coupling, whatever that means.

Re:Implementing UFCS for C++ in Clang by mehrdadn on Monday August 03, 2020 @04:05PM (#24042689)
This isn't really true in every language. Not every use of inheritance is a case of OOP. Inheritance is a mechanism used for multiple purposes (especially in C++) and OOP is merely one of them. It's also just a way to do mixins, and it's frequently used for that in C++.