Abstract
Elixir is a functional programming language created in 2012, whose popularity is growing in the industry. Despite this fact, and to the best of our knowledge, there are few works in the literature focused on studying the internal quality of systems implemented with this language. In a preliminary and previous study, we conducted a grey literature review to provide an initial list of Elixir-specific code smells. Aiming to expand the results of this preliminary study, in this work we use a mixed methodology, based on the interaction with the Elixir developer community and on the mining of issues, commits, pull requests, and the source code in GitHub repositories to prospect and document new code smells for this language. As a result, we propose a catalog composed of 35 code smells, 23 of them are new and specific to Elixir, and 12 of them are traditional code smells, as cataloged by Fowler and Beck, which also affect Elixir systems. We validated this catalog by conducting a survey with 181 experienced Elixir developers from 37 countries and all continents. In this survey, we assessed the levels of relevance and prevalence of each smell in the catalog. We show that most smells in Elixir have relevance levels capable of impacting the readability, maintainability, and evolution of Elixir systems. Furthermore, most of the smells are not uncommon in production code. Our results have practical implications related to the prevention and removal of code smells in Elixir.
Author supplied keywords
Cite
CITATION STYLE
Francisco da Matta Vegi, L., & Valente, M. T. (2023). Understanding code smells in Elixir functional language. Empirical Software Engineering, 28(4). https://doi.org/10.1007/s10664-023-10343-6
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.