this post was submitted on 02 Jul 2026
-27 points (37.1% liked)
Programmer Humor
32158 readers
749 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
"We spent two decades making sure the compiler will never produce memory-unsafe code. It requires a lot of nigh-illegible boilerplate code to even compile and adds massive cognitive load, but the effort will be worth it.
Anyway, here's a type whose only purpose is to disable all of that shit."
Cell doesn't disable memory safety, though? It comes with additional restrictions such as being unable to share between threads (statically enforced) obviously, it's not an unsafe feature. You also can't read from it unless your type can be bitwise copied, etc.
Interior mutability is mostly for making immutable interfaces that for some reason or another benefit from storing a bit of mutable state, such as for lazy evaluation. It's also used for cross thread communication in some cases since you have to use shared (immutable) references to share things between threads.
this is the entire source code for an app that performs a rather complex function, note the absence of boilerplate
from https://codeberg.org/Mycellf/wordjoin