Mostly because compilers do this kind of stuff if you optimize for space, iirc. Not that you should never do it or something, but it kinda looks like premature optimization to me.
this post was submitted on 06 Sep 2025
491 points (97.3% liked)
Programmer Humor
26203 readers
1737 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 2 years ago
MODERATORS
Check out “densly packed decimal” encoding,
C lets you do this by putting text in single quotes:
int foo = 'Abcd';
works
load more comments
(1 replies)
Use strings for everything and use a single universal method to convert some to floats only when you absolutely have to.
It is neither useless nor funny. It's optimization for storage capacity. If everyone in the world put in that level of effort into compression, computer storage and processing would actually be faster than the previous generation.
load more comments
(5 replies)