Clean Coder: The Dark Path (2017)
3 months ago
- #testing
- #software-development
- #programming-languages
- The author has been exploring Swift and Kotlin, noting their similarities and functional programming characteristics.
- Both Swift and Kotlin emphasize strong static typing, aiming to close type holes present in their parent languages (Objective-C and Java).
- The author expresses concern over the inflexibility of Swift and Kotlin's type systems, particularly around exceptions, inheritance, and nullable types.
- Swift and Kotlin enforce strict rules for exception handling, inheritance (using 'open' and 'override' keywords), and nullable type checks, which the author views as overly restrictive.
- The author questions whether the responsibility for managing risks (like exceptions, inheritance, and nulls) should lie with the language or the programmer.
- The critique extends to the complexity and verbosity introduced by these language features, likening them to 'language lawyering'.
- The author argues that defects are the fault of programmers, not languages, and emphasizes the importance of testing over language-enforced constraints.
- The article concludes by warning against over-reliance on language safeties, advocating instead for rigorous testing practices to prevent software defects.