Reproduce “Functional Programming and Security” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Yusuf Moosa Motara
This paper from Yusuf Moosa Motara at Rhodes University explores whether functional programming languages inherently lead to more secure code than imperative counterparts. It provides a comprehensive analysis comparing C# and F# code examples to demonstrate how functional features like immutability and discriminated unions align with established security principles, suggesting the paradigm can mitigate common vulnerabilities.
Key insights
- Immutability in functional programming prevents accidental or malicious modifications to critical data structures, eliminating a class of vulnerabilities related to unexpected state changes.
- Discriminated unions combined with pattern matching enforce comprehensive and type-safe error handling, making it impossible for developers to overlook error conditions that often lead to vulnerabilities.
- Functional programming reduces the attack surface by minimizing mutable shared state and providing explicit data flow through pure functions, which simplifies security audits and the identification of untrusted data.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.