🤖 AI Summary
This study investigates how object-oriented programming (OOP) and functional programming (FP) influence key software architecture characteristics to inform paradigm selection decisions. Method: Using a controlled experiment, we implemented an identical digital wallet system in Kotlin (OOP) and Scala (FP). We employed a mixed-methods approach: reflexive ethnography—observing developers’ coding and code-reading activities—and a structured survey (N=42), complemented by quantitative code metrics and architectural feature assessments. Contribution/Results: FP demonstrated superior module boundary clarity and state predictability, whereas OOP excelled in incremental extensibility and intuitive domain modeling. Readability differences were context-dependent. Crucially, this work provides the first hybrid empirical evidence on paradigm impact from both *writing* and *understanding* perspectives, offering actionable, data-driven insights for architectural trade-offs and team-level technology adoption decisions.
📝 Abstract
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.