this post was submitted on 17 Dec 2025
515 points (96.2% liked)

Programmer Humor

28424 readers
1463 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Sunrosa@lemmy.world 2 points 3 weeks ago (2 children)

"fn" was just one example. There's also other abbreviations like "pub", "impl", "extern", "mut", "ref", "bool", "u64" And it's true that some of these keywords are only relevant in Rust, however other langues have their own specific keywords, and they tend to be longer. In languages like Java (which is the worst example I can think of), you see things like "private static boolean" as function definition. In c++, you have to type "unsigned long" or even "unsigned long long" to represent "u64" (depending on data model).

[–] Ephera@lemmy.ml 2 points 3 weeks ago

I really don't agree with saving keypresses being a useful metric, since auto-completion is a thing and code is read significantly more often than it is written. I am also a staunch opponent of abbreviations being used for variable names.

But I will say that I don't mind abbreviations in keywords, since well, you need to learn the meaning either way.
And yeah, I've come to somewhat like them being used for keywords, since it reduces visual noise where it really isn't useful, and it distinguishes keywords from actual code.
Ultimately, keywords are just syntax where letters were used instead of a symbol. You do read them like a symbol, so if they don't look like a real word, that seems to work quite well for my brain.

[–] ChaosMonkey@lemmy.dbzer0.com 1 points 3 weeks ago

To be fair, in C/C++ you can include stdint.h which defines type aliases such as uint64_t.