Abstract
Java introduced in version 8 with the Stream API means to operate on collections using lambda expressions. Since then, this API is an alternative way to handle collections in a more declarative manner instead of the traditional, imperative style using loops. However, whether the Stream API is beneficial in comparison to loops in terms of usability is unclear. The present paper introduces a randomized control trial (RCT) on the understandability of collection operations performed on 20 participants with the dependent variables response time and correctness. As tasks, subjects had to determine the results for collection operations (either defined with the Stream API or with loops). The results indicate that the Stream API has a significant (mathrm{p}
Author supplied keywords
Cite
CITATION STYLE
Mehlhorn, N., & Hanenberg, S. (2022). Imperative versus Declarative Collection Processing: An RCT on the Understandability of Traditional Loops versus the Stream API in Java. In Proceedings - International Conference on Software Engineering (Vol. 2022-May, pp. 1157–1168). IEEE Computer Society. https://doi.org/10.1145/3510003.3519016
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.