arrow
返回

Programmers do not favor lambda expressions for concurrent object-oriented code

delete2018-05-02
delete16
PRE
AI
S
Sebastian Nielebock *
R
Robert Heumüller
F
Frank Ortmeier
DOI:10.1007/s10664-018-9622-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Lambda expressions have long been state-of-the-art in the functional programming paradigm. Especially with regard to the use of higher-order functions, they provide developers with a means of defining predicate or projection functions locally, which greatly increases the comprehensibility of the resulting source code. This benefit has motivated language designers to also incorporate lambda expressions into object-oriented (OO) programming languages. In particular, they are claimed to facilitate concurrent programming. One likely reason for this assumption is their purity: pure lambda expressions are free of side effects, and therefore cannot cause, e.g., race conditions. In this paper, we present the first empirical analysis of whether or not this claim is true for OO projects. For this purpose, we investigated the application of lambda expressions in 2923 open-source projects, implemented in one of the most common OO programming languages: C#, C++, and Java. We present three major findings. First, the majority of lambda expressions are not applied in concurrent code and most concurrent code does not make use of lambda expressions. Second, for all three of the languages, we observed that developers compromise their code by applying a significantly higher number of impure, capturing lambda expressions, which are capable of causing race conditions. Finally, we explored further use cases of lambda expressions and found out that testing, algorithmic implementation, and UI are far more common use-cases for the application of lambda expressions. Our results encourage to investigate in more detail the reasons that hinder programmers to apply lambda expressions in concurrent programming and to support developers, e.g., by providing automatic refactorings.
Keyword:
Lambda expression
Concurrency
Object-orientation
Programming language
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

O
Otto von Guericke University
学者数:
8.5K
论文数: 6.7K
被引数: 54
引用论文

引用论文

Predicting patients' exposure to cyclosporin
err1996-08-01
err0
PREAI
errA. Johnston; J. M. Kovarik; E. A. Mueller; D. W. Holt
err分享
err收藏
Renal transplantation in children with abnormal lower urinary tract
err2004-12-01
err0
PREAI
errB. Ali-El-Dein; H. Abol-Enein; A. El-Husseini; Y. Osman; A.B. Shehab El-Din; M.A. Ghoneim
err分享
err收藏
Bilateral Wilms Tumor in a Boy with Severe Hypospadias and Cryptorchidism Due to a Heterozygous Mutation in the WT1 Gene由于WT1基因的杂合突变,患有严重尿道下裂和隐睾的男孩的双侧Wilms肿瘤
err1999-02-01
err0
errOAAI
errBirgit Köhler; Valerie Schumacher; Ursula Schulte-Overberg; Wolfgang Biewald; Thomas Lennert; Dagmar l'Allemand; Brigitte Royer-Pokora; Annette Grüters
err分享
err收藏
Adoption and use of Java generics采用和使用Java泛型
err2012-12-06
err34
PREAI
errParnin, Chris; Bird, Christian; Murphy-Hill, Emerson
err分享
err收藏
A large-scale study on the usage of Java's concurrent programming constructs关于Java并发编程结构用法的大规模研究
err2015-08-01
err38
PREAI
errPinto, Gustavo; Torres, Weslley; Fernandes, Benito; Castor, Fernando; Barros, Roberto S. M.
err分享
err收藏
err分享
err收藏
学者 查看更多内容