After decades of dominance by object-oriented programming (OOP), functional programming (FP) is gaining increasing attention in the software industry. This study compares the impact of OOP and FP on the architectural characteristics of software systems. For that, it examines the design and implementation of a Digital Wallet system, developed in Kotlin (representing OOP) and Scala (representing FP). The comparison is made through both qualitative and quantitative analyses to explore how each paradigm influences the system's architectural characteristics. The self-ethnographic qualitative analysis provides a side-by-side comparison of both implementations, revealing the perspective of those writing such code. The survey-based quantitative analysis gathers feedback from developers with diverse backgrounds, showing their impressions of those reading this code. Hopefully, these results may be useful for developers or organizations seeking to make more informed decisions about which paradigm is best suited for their next project.
翻译:在面向对象编程(OOP)主导数十年后,函数式编程(FP)在软件行业正获得日益增长的关注。本研究比较了OOP与FP对软件系统架构特性的影响。为此,我们考察了分别采用Kotlin(代表OOP)和Scala(代表FP)开发的数字钱包系统的设计与实现。通过定性与定量分析相结合的方式,探究每种范式如何影响系统的架构特性。自我民族志式的定性分析对两种实现进行了并行比较,揭示了编写此类代码者的视角;基于调查的定量分析则收集了来自不同背景开发者的反馈,展现了阅读此类代码者的印象。希望这些结果能为开发者或组织在选择更适合其下一项目的编程范式时,提供更明智的决策依据。