Luzius MeisserHe is right regarding inheritance and polymorphism. Usually, composition and interfaces work better. However, he is wrong on encapsulation. First, encapsulationSee more can help structuring a program very nicely. Second, the main weakness of encapsulation and object-oriented programming in general is one he does not mention at all: namely that its philosophy goes directly against that of table-based databases and many other forms of persistence. The basic idea of object-oriented programming is that data and functions that operate on that data belong together. Relational databases are built on the opposite idea, namely that data should be separated completely from the functions that operate on that data. So whenever you want to connect objects to a database, there are lots of frictions.
¿Una bofetada a tiempo? Por qué el castigo físico a los niños siempre es una mala idea. Tras revisar miles de estudios, investigadores concluyen que la violencia corporal, por leve que sea, tiene consecuencias negativas para el futuro de los menores en diversos aspectos