this post was submitted on 15 Nov 2023
238 points (97.6% liked)

Programmer Humor

19652 readers
2205 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Fin is a type of finite oridinals bounded by a nat. For example the WTF type in there is the same type as Fin 8.

Of course every language can have Fin with a fixed integer, like the post suggest, by just stacking options.

However for a properly defined Fin type, the input number is dynamic, serves as a bound for the element of the type. For example, Adga was able to type the fact that nth fibonacci number is a finite ordinal bounded by a function of n. Which I believe is not typable in rust?