Search papers, labs, and topics across Lattice.
This paper investigates how the "easy-hard-split" formal strategy can improve the clarity and conceptual design of Haskell functions, using examples from the Hackage repository. It argues that this strategy, which separates straightforward and complex aspects of a function, leads to better documentation and code re-use. The paper demonstrates the effectiveness of this approach through comparative analysis with similar functions in other languages, highlighting its applicability to both program analysis and synthesis within functional programming.
Functional programming can achieve greater clarity and reusability by adopting a formal "easy-hard-split" strategy, leading to higher-quality software libraries.
Since its birth as a new scientific body of knowledge in the late 1950s, computer programming has become a fundamental skill needed in many other disciplines. However, programming is not easy, it is prone to errors and code re-use is key for productivity. This calls for high-quality documentation in software libraries, which is quite often not the case. Taking a few Haskell functions available from the Hackage repository as case-studies, and comparing their descriptions with similar functions in other languages, this paper shows how clarity and good conceptual design can be achieved by following a so-called easy-hard-split formal strategy that is quite general and productive, even if used informally. This strategy is easy to use in functional programming and can be applied to both program analysis and synthesis.