Found in 1 comment on Hacker News
gbear0 · 2019-12-30 · Original thread
Since this is HN, I'd like to tie this into thoughts I've had on programming languages for years, which unfortunately I'm not skilled enough to rigorously prove.

I know OOP is out now-a-days, but bear with me cause I don't know of any equivalent functional papers/books to describe this idea as well. Elemental Design Patterns [1] shows a way of relating the formal lambda calculus of OOP relationships to design patterns by defining the set of the core operation relationships between types/objects/fns/etc. If you treat all objects/types/functions/etc as a cartesian grid, those core relationships define a basis vector that allows you to combine different operations that create the famous OOP design patterns. And in fact I've always thought of that basis vector the same way as the movements of a chess board, and I've wondered if there's other moves you could add to provide an easier way of hitting all squares.

Since a programming language selects specific syntax to navigate these relationships, if you could describe a language in terms of a lower level basis language, would it make it easier to see which patterns are missing from a language to help move from one concept to another? Could this help design committees select better language constructs that don't do the same things, or conflict in some way? And I'm going to go out here on a limb and hypothesize that a language is Turing Complete if it provides language constructs to allow you to hit every square on the grid, but again not enough skill to prove it myself.

Anyways, I've never thought about the modulo math of these operations like in the case of a Knight's move, so this was super interesting! Does anyone know of any good papers/talks on type theory mixed with modulo spaces, cause I'm certain you could build a different basis for more functional patterns using category theory, and now I'm curious how it might tie in.

[1] https://www.eecs.yorku.ca/course_archive/2006-07/F/6431/Stot..., https://www.amazon.ca/Elemental-Design-Patterns-Jason-Smith/...

Fresh book recommendations delivered straight to your inbox every Thursday.