Об’єктно-орієнтована парадигма: pro і contra
Loading...
Date
2025
Authors
Бублик, Володимир
Фітель, Данило
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
У статті наведено критику парадигми об’єктно-орієнтованого програмування (ООП) та її найбільш поширених реалізацій. Досліджено історію виникнення та подальшої еволюції ООП, її сильні й слабкі сторони, а також спільні й відмінні риси між ООП та іншими парадигмами. Проаналізовано приклади вдалого співіснування парадигм ООП і узагальненого програмування на прикладі шаблонів у мові C++.
Description
This paper critically examines the object-oriented programming (OOP) paradigm, tracing its theoretical foundations and evaluating its most widely adopted modern implementations. Particular attention is given to the criticisms that have emerged over time, notably those stemming from Edsger Dijkstra’s remark that "object-oriented programming is an exceptionally bad idea…." We aim to interpret and contextualize Dijkstra’s dissatisfaction with contemporary OOP, offering a practical perspective on its implications. We begin by exploring the origins of the object-oriented paradigm, highlighting its evolution from procedural programming and the fundamental conceptual shift it introduces—namely, the incorporation of programmable abstractions. Given OOP’s widespread adoption across numerous programming languages, we distill its core principles and examine their shared characteristics. Additionally, we provide a refined definition of the object-oriented paradigm based on these key principles, emphasizing its role as a powerful and flexible mechanism for creating abstractions, rather than a simplistic combination of more specific programming language features. Our analysis also outlines the advantages and limitations inherent in common OOP principles, including the SOLID principles. We present specific recommendations, along with examples of both successful and flawed implementations of various OOP concepts. Importantly, we stress that the object-oriented paradigm functions best as an optional tool for abstraction rather than an imposed constraint. Finally, we examine the paradigm’s most effective attributes, particularly its ability to coexist with and enhance other programming methodologies. To illustrate this adaptability, we present a case study on template metaprogramming in C++, demonstrating how OOP can facilitate the creation of sophisticated custom
abstractions with precise control over their behavior and degrees of reusability that are not achievable by a single programming paradigm.
Keywords
парадигма програмування, об’єктно-орієнтована парадигма, узагальнене програмування, стаття, programming paradigm, object-oriented paradigm, generic programming, template metaprogramming
Citation
Бублик В. В. Об’єктно-орієнтована парадигма: pro і contra / Бублик В. В., Фітель Д. Р. // Наукові записки НаУКМА. Комп'ютерні науки. - 2025. - Т. 8. - С. 138-148. - https://doi.org/10.18523/2617-3808.2025.8.138-148