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

Programmer Humor

19522 readers
206 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] 5 points 1 year ago* (last edited 1 year ago) (1 children)

For those interested, this is because of how Rust uses value gaps to represent its nullable/enum structures. E.g., like how None for Option NonZeroU8 [sic, can't get formatting to work] is represented internally by a 0 instead of a wrapping structure.

When you have that many layers around a unit, it will start at 0 and bump the internal representation for each Some you turn into a None.

[โ€“] [email protected] 1 points 11 months ago

It's kinda like lambda calculus numbers