Boilerplate Tax – Ranking popular programming languages by density
3 months ago
- #code-metrics
- #software-development
- #programming-languages
- The author explores the use of ULOC (Unique Lines of Code) in scc to measure project complexity, comparing it to SLOC.
- ULOC discounts blank lines, close-brace lines, and repetitive code while counting comments, offering a better complexity estimate.
- The author analyzes ULOC across top GitHub repositories, finding languages like Clojure and Haskell have the highest uniqueness (DRYness).
- Modern languages like Go and Rust show similar levels of boilerplate, contrary to initial assumptions.
- Java is found to be more DRY than expected, while Clojure leads in code density.
- The study suggests that modern languages may introduce more redundancy compared to older, more expressive languages like Lisp.
- Resources for replicating the study include a Python script, scc tool, and top GitHub repository lists.