HackerPapers

arXiv:1001.1662cs.LO

States and exceptions considered as dual effects

Jean-Guillaume Dumas, Dominique Duval, Laurent Fousse, Jean-Claude Reynaud

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

In this paper we consider the two major computational effects of states and exceptions, from the point of view of diagrammatic logics. We get a surprising result: there exists a symmetry between these two effects, based on the well-known categorical duality between products and coproducts. More precisely, the lookup and update operations for states are respectively dual to the throw and catch operations for exceptions. This symmetry is deeply hidden in the programming languages; in order to unveil it, we start from the monoidal equational logic and we add progressively the logical features which are necessary for dealing with either effect. This approach gives rise to a new point of view on states and exceptions, which bypasses the problems due to the non-algebraicity of handling exceptions.

arXiv comments
Journal reference
DOI
Subjects
cs.LOLogic in Computer Science math.CTCategory Theory

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jan 2025 to Jan 2025.

Comments linking this paper, per year.

Discussed in comments1 thread

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.