Table of Contents
Fetching ...

Functional vs. Object-Oriented: Comparing How Programming Paradigms Affect the Architectural Characteristics of Systems

Briza Mel Dias de Sousa, Renato Cordeiro Ferreira, Alfredo Goldman

TL;DR

The paper addresses the question of how object-oriented and functional programming paradigms shape architectural characteristics in software systems. It compares two Digital Wallet implementations—one in Kotlin (OOP) and one in Scala (FP)—using a mixed-method approach that combines self-ethnographic qualitative analysis with developer surveys. Key findings show Kotlin offers clearer error handling and readability, while Scala provides more concise and reusable patterns via higher-order functions and pattern matching, though with some trade-offs in error propagation. The work provides practical guidance for paradigm choice and sets up directions for future work on security, scalability, and broader validation across languages and contexts.

Abstract

This study compares the impact of adopting object-oriented programming (OOP) or functional programming (FP) on the architectural characteristics of software systems. For that, it examines the design and implementation of a Digital Wallet system developed in Kotlin (for OOP) and Scala (for FP). The comparison is made through a mixed-method approach. 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 seeking to decide which paradigm is best suited for their next project.

Functional vs. Object-Oriented: Comparing How Programming Paradigms Affect the Architectural Characteristics of Systems

TL;DR

The paper addresses the question of how object-oriented and functional programming paradigms shape architectural characteristics in software systems. It compares two Digital Wallet implementations—one in Kotlin (OOP) and one in Scala (FP)—using a mixed-method approach that combines self-ethnographic qualitative analysis with developer surveys. Key findings show Kotlin offers clearer error handling and readability, while Scala provides more concise and reusable patterns via higher-order functions and pattern matching, though with some trade-offs in error propagation. The work provides practical guidance for paradigm choice and sets up directions for future work on security, scalability, and broader validation across languages and contexts.

Abstract

This study compares the impact of adopting object-oriented programming (OOP) or functional programming (FP) on the architectural characteristics of software systems. For that, it examines the design and implementation of a Digital Wallet system developed in Kotlin (for OOP) and Scala (for FP). The comparison is made through a mixed-method approach. 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 seeking to decide which paradigm is best suited for their next project.

Paper Structure

This paper contains 34 sections, 6 figures, 1 table.

Figures (6)

  • Figure 1: Transaction Lifecycle.
  • Figure 2: Wallets and corresponding Subwallets.
  • Figure 3: Pairs of Journal Entry for each Transaction type.
  • Figure 4: Services that compose the Digital Wallet system.
  • Figure 5: Kotlin vs. Scala --- retryBatch
  • ...and 1 more figures