Yoneda Paradigm

The Yoneda paradigm

Introduction: The Yoneda lemma (opens in a new tab), known as the most important result in category theory, expresses the following idea: "everything in a category is completely determined by its relationships to everything else." (opens in a new tab) This is a powerful statement that is often overlooked by many programmers (and none-programmers alike). It expresses something fundamental about representations/interpretation, and the conceptual difference between a "domain" and the language that underpins it (related to Jacques Derrida's idea about différance).

The Yoneda paradigm, inspired by the Yoneda lemma, is a new programming paradigm where its first class citizens are not functions, procedures, objects/classes, etc, but the relations between "abstractions" (at the meta-abstraction level that are of most interest to the users). This means we can drop all concerns about their internal structures/implementations, as the "implicit wirings" will be all sorted out somehow*.

Programming in the Yoneda paradigm should feel natural and intuitive. It would be akin to coding in the comfort of the fuzzy contexts among words in human conversations, while still maintain the rigour to depict logical aspects of a program, which, in its code representation, is really just a special data structure (à la John von Neumann (opens in a new tab)).

*: as of 2023, the most realistic approach will be via the use of LLMs under an orchestration system