<  Retour au portail Polytechnique Montréal

A study on the pythonic functional constructs' understandability

Cyrine Zid, Fiorella Zampetti, Giuliano Antoniol et Massimiliano Di Penta

Présentation (2024)

Document en libre accès chez l'éditeur officiel
Un lien externe est disponible pour ce document
Afficher le résumé
Cacher le résumé

Abstract

The use of functional constructs in programming languages such as Python has been advocated to help write more concise source code, improve parallelization, and reduce side effects. Nevertheless, their usage could lead to understandability issues. This paper reports the results of a controlled experiment conducted with 209 developers to assess the understandability of given Pythonic functional constructs---namely lambdas, comprehensions, and map/reduce/-filter functions---if compared to their procedural alternatives. To address the study's goal, we asked developers to modify code using functional constructs or not, to compare the understandability of different implementations, and to provide insights about when and where it is preferable to use such functional constructs. Results of the study indicate that code snippets with lambdas are more straightforward to modify than the procedural alternatives. However, this is not the case for comprehension. Regarding the perceived understandability, code snippets relying on procedural implementations are considered more readable than their functional alternatives. Last but not least, while functional constructs may help write compact code, improving maintainability and performance, they are considered hard to debug. Our results can lead to better education in using functional constructs, prioritizing quality assurance activities, and enhancing tool support for developers.

Mots clés

Matériel d'accompagnement:
Département: Département de génie informatique et génie logiciel
Organismes subventionnaires: EMELIOT project, PON
Numéro de subvention: ID 2020W3A5FY, DM 1062/2021
ISBN: 9798400702174
URL de PolyPublie: https://publications.polymtl.ca/58445/
Nom de la conférence: 2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE 2024)
Lieu de la conférence: Lisbon, Portugal
Date(s) de la conférence: 2024-04-14 - 2024-04-20
DOI: 10.1145/3597503.3639211
URL officielle: https://doi.org/10.1145/3597503.3639211
Date du dépôt: 03 juin 2024 14:54
Dernière modification: 06 janv. 2026 13:39
Citer en APA 7: Zid, C., Zampetti, F., Antoniol, G., & Di Penta, M. (avril 2024). A study on the pythonic functional constructs' understandability [Présentation]. Dans 2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE 2024), Lisbon, Portugal (13 pages). https://doi.org/10.1145/3597503.3639211

Statistiques

Dimensions

Actions réservées au personnel

Afficher document Afficher document