HackerPapers

arXiv:2602.16291cs.PL

A Calculus of Inheritance

Bo Yang

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

Abstract

Just as the $λ$-calculus is a pure functional programming language built from three primitives (abstraction, application, variable), we present inheritance-calculus, a pure declarative programming language built from three primitives (mixin, definition, reference). We introduce multi-target $\mathtt{this}$ to solve the problem that inheritance conflicts with modularity, and thereby unify object-oriented and configuration constructs: modules, classes, objects, methods, fields, and locals become a single mixin abstraction, and inheritance becomes simply set union, the deep merge of configuration languages. Consequently, composition is commutative, idempotent, and associative, structurally eliminating the multiple-inheritance linearization problem; the inheritance relation has substitutability; every path of every program can be inherited and extended; every subtree can be split into parts that, inherited together, behave as the whole; and programs have no side effects and cover every input. We call these properties modularity by construction. The calculus has no functions, yet it macro-expresses the lazy $λ$-calculus and is more macro-expressive than it in Felleisen's sense. Its semantics is first-order, denotational, and evaluated by tabling, even for cyclic inheritance hierarchies. Inheritance-calculus is distilled from MIXINv2, an implementation in which the same code acts as different function colors and ordinary arithmetic agrees with the relational semantics of logic programming.

arXiv comments
Journal reference
DOI
Subjects
cs.PLProgramming Languages cs.SESoftware Engineering

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 1 thread, from Feb 2026 to Feb 2026. Found in 1 HN submission from Feb 2026 to Feb 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • I fed the abstract into an AI with the prompt: can you give me a critique of https://arxiv.org/abs/2602.16291 from the point of view of a functional programmer who is skeptical and I liked the answer. I won't post it here, because I think AI answers are generally noise and quite…

      ggmView on HNParent context

    • Yes, and here is the result. The question was can you give me a critique of __https://arxiv.org/abs/2602.16291__ And the last part of the response was: Overall assessment This is an intriguing paper with genuinely creative ideas, but the abstract raises as many questions as it…

      ggmView on HNParent context

Submitted to Hacker News

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