MonoSR: A Monoidal-Monad Pattern for Bridging Gaps in Developer Communication and Code Semantics
Category theory is a branch of mathematics that focuses on understanding and organizing mathematical concepts at a high level, with an emphasis on the structural and functional relationships between different mathematical entities. Despite its highly abstract nature, category theory has proven valuable in various technical fields, including software architecture design. However, these concepts often remain confined to purely functional languages due to their steep learning curve and the lack of widely applicable design patterns, limiting their adoption in mainstream programming languages. In this paper, we introduce a design pattern that reinterprets and integrates the State and Reader monads with monoidal data types, creating a powerful abstraction for describing and conveying program intent. We show that this pattern is versatile, applicable across different programming languages, and capable of expressing a wide range of functionalities. Additionally, we argue that adopting this pattern can lead to clearer code semantics, thus improving communication among developers.
Authors
- Ádám Csapó (ORCID: https://orcid.org/0000-0001-9885-137X)
Institutions
- Corvinus University of Budapest (HU)
Publication Details
- Published
- 2024-09-16
- DOI
- https://doi.org/10.1109/coginfocom63007.2024.10894741
- Primary Topic
- Innovative Teaching and Learning Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00