How Developers Use Type-System Related Programming Language Features

Wedi'i Gadw mewn:
Manylion Llyfryddiaeth
Cyhoeddwyd yn:ProQuest Dissertations and Theses (2025)
Prif Awdur: Flint, Samuel W.
Cyhoeddwyd:
ProQuest Dissertations & Theses
Pynciau:
Mynediad Ar-lein:Citation/Abstract
Full Text - PDF
Tagiau: Ychwanegu Tag
Dim Tagiau, Byddwch y cyntaf i dagio'r cofnod hwn!

MARC

LEADER 00000nab a2200000uu 4500
001 3235169063
003 UK-CbPIL
020 |a 9798290916286 
035 |a 3235169063 
045 2 |b d20250101  |b d20251231 
084 |a 66569  |2 nlm 
100 1 |a Flint, Samuel W. 
245 1 |a How Developers Use Type-System Related Programming Language Features 
260 |b ProQuest Dissertations & Theses  |c 2025 
513 |a Dissertation/Thesis 
520 3 |a Optional type annotations are a popular feature of programming languages that allow developers to omit explicit type information in code while, in some cases, retaining many of the benefits of static typing, such as in-code documentation, improved detection of type errors, or enforcement of code properties. However, how developers use and understand optional type annotations is not clear. The focus of this dissertation is to understand the use and comprehension of optional type annotations.Optional type annotations are examined through four lenses: first, by examining the evolution of usage in a statically typed programming language (Kotlin, the default language for Android), we find that locations tend to retain their annotation (or lack thereof) over time, and some locations such as initialized class fields and single-expression method return types receive type annotations more frequently than others.Second, by examining the output of large language models (LLMs) for the presence of type annotations when generating code, we find differing behavior between languages, with Python being minimally annotated unless explicitly requested. But explicitly requesting types also leads to more syntax errors.Third, by using eye tracking to better understand developer reference behavior (such as looking back at a line containing a declaration) with respect to type annotations, we find that developers did not engage in reference behavior more frequently in code with type annotations.Finally, through direct intervention, asking developers why they made a particular change to a type annotation, we find the three most common reasons type annotations are modified (or added/removed) are due to an incorrect type causing an error, to improve their function as documentation, or to adhere to a formal convention.Together, this confirms that developers view type annotations as documentation, especially in certain locations, even if they are rarely modified. However, how this information gets utilized by other developers or LLMs is unclear: we do not see evidence that developers refer to it during bug localization, and we see that requesting type annotations can cause downstream problems for popular tools such as LLMs. 
653 |a Computer science 
653 |a Computer engineering 
653 |a Information technology 
773 0 |t ProQuest Dissertations and Theses  |g (2025) 
786 0 |d ProQuest  |t ProQuest Dissertations & Theses Global 
856 4 1 |3 Citation/Abstract  |u https://www.proquest.com/docview/3235169063/abstract/embedded/H09TXR3UUZB2ISDL?source=fedsrch 
856 4 0 |3 Full Text - PDF  |u https://www.proquest.com/docview/3235169063/fulltextPDF/embedded/H09TXR3UUZB2ISDL?source=fedsrch