Write a Blog >>
MSR 2018
Mon 28 - Tue 29 May 2018 Gothenburg, Sweden
co-located with * ICSE 2018 *
Mon 28 May 2018 14:34 - 14:51 at E3 room - Programming Practice Chair(s): Romain Robbes

Swift is a new programming language developed by Apple as a replacement to Objective-C. It features a sophisticated error handling (EH) mechanism that provides the kind of separation of concerns afforded by exception handling mechanisms in other languages, while also including constructs to improve safety and maintainability. However, Swift also inherits a software development culture stemming from Objective-C being the de-facto standard program- ming language for Apple platforms for the last 15 years. It is, therefore, a priori unclear whether Swift developers embrace the novel EH mechanisms of the programming language or still rely on the old EH culture of Objective-C even working in Swift. In this paper, we study to what extent developers adhere to good practices exemplified by EH guidelines and tutorials, and what are the common bad EH practices particularly relevant to Swift code. Furthermore, we investigate whether perception of these practices differs between novices and experienced Swift developers. To answer these questions we employ a mixed-methods approach and combine 10 semi-structured interviews with Swift developers and quantitative analysis of 78,760 Swift 4 files extracted from 2,733 open-source GitHub repositories. Our findings indicate that there is ample opportunity to improve the way Swift developers use error handling mechanisms. For instance, some recommendations derived in this work are not well spread in the corpus of studied Swift projects. For example, generic catch handlers are common in Swift (even though it is not uncommon for them to share space with their counterparts: non empty catch handlers), custom, developer-defined error types are rare, and developers are mostly reactive when it comes to error handling, using Swift’s constructs mostly to handle errors thrown by libraries, instead of throwing and handling application-specific errors.

Mon 28 May

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

14:00 - 15:30
Programming PracticeTechnical Papers at E3 room
Chair(s): Romain Robbes Free University of Bozen-Bolzano
14:00
17m
Full-paper
Understanding the Usage, Impact, and Adoption of Non-OSI Approved Licenses
Technical Papers
A: Rômulo Manciola Meloca UFRGS, A: Gustavo Pinto UFPA, A: Leonardo Pontes Baiser , A: Marco Mattos , A: Ivanilton Polato , A: Igor Wiese Federal University of Technology - Paraná (UTFPR), A: Daniel M. German
Pre-print
14:17
17m
Full-paper
Prevalence of Confusing Code in Software Projects - Atoms of Confusion in the Wild
Technical Papers
A: Dan Gopstein New York University, A: Hongwei Zhou , A: Phyllis Frankl , A: Justin Cappos
DOI Pre-print Media Attached
14:34
17m
Full-paper
How Swift Developers Handle Errors
Technical Papers
A: Nathan Cassee , A: Gustavo Pinto UFPA, A: Fernando Castor UFPE, A: Alexander Serebrenik Eindhoven University of Technology
Pre-print
14:51
17m
Full-paper
What are your Programming Language’s Energy-Delay Implications?
Technical Papers
A: Stefanos Georgiou Athens University of Economics and Business, A: Maria Kechagia Delft University of Technology, A: Panos Louridas , A: Diomidis Spinellis Athens University of Economics and Business
DOI Pre-print
15:08
7m
Short-paper
Automatically Assessing Code Understandability Reanalyzed: Combined Metrics Matter
Technical Papers
A: Asher Trockman University of Evansville, A: Keenen Cates , A: Mark Mozina , A: Tuan Nguyen , A: Christian Kästner Carnegie Mellon University, A: Bogdan Vasilescu Carnegie Mellon University
Pre-print Media Attached
15:15
15m
Other
Discussion phase
Technical Papers