this post was submitted on 02 Sep 2026
791 points (97.9% liked)

Programmer Humor

33104 readers
64 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] LongLive@lemmy.world 23 points 3 days ago (2 children)
[–] degen@midwest.social 49 points 3 days ago (1 children)

It's kinda like set or category theory. The kind of math that hardly resembles anything at all yet somehow applies everywhere, to infinity and beyond

[–] ytg@sopuli.xyz 3 points 2 days ago* (last edited 2 days ago) (1 children)

Indeed. [And caveat this whole comment with "as far as I understand" because this is maths and you can't be too careful…] The difference being that set theory is way more fundamental and abstract than most mathematicians ever need, so on the one hand it can be completely stated with only 8 or 9 axioms (and a system of first-order logic) but on the other hand it can take some ingenuity to encode a mathematical object as a set in a way that makes it easy to do stuff correctly and hard to mess up.

Most type theories take a more intuitive approach, so they do resemble something, namely, functional programming. Just a very rigorous approach to it. If you manage to construct a term of the correct type, you can be sure that it's what you think it is, whereas with set theory you have to constantly check yourself (if you require the rigor). The trade-off being that type theory requires you to work with complete rigor and reasoning at a low level can be more difficult than set-theoretic reasoning at a low level.

The TL;DR is that in type theory your constructions often look like what you actually want to do (and as a consequence you sometimes have to work directly with the underlying system, like a programming language), but in set theory there's a disconnect between the conceptual level and the underlying nitty-gritty logic.

[–] degen@midwest.social 2 points 1 day ago

Good call pointing out that types are, like, meant to bring semblance to the whole thing lol

[–] Jankatarch@lemmy.world 16 points 3 days ago* (last edited 2 days ago)

People who use templates and types to achieve absurd outcomes that just work, maybe?

I have seen a few haskell magic.