238
you are viewing a single comment's thread
view the rest of the comments
[-] gsfraley@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

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.

[-] Hack3900@lemy.lol 1 points 11 months ago

It's kinda like lambda calculus numbers

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

Programmer Humor

19623 readers
1 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