this post was submitted on 15 Nov 2023
222 points (97.8% liked)

Programmer Humor

19463 readers
15 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
[โ€“] gsfraley 5 points 11 months ago* (last edited 11 months 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