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

Programmer Humor

28580 readers
869 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
[–] 30p87@feddit.org 26 points 1 month ago (9 children)

Almost any language is OK, but Rust is just so, so fucking ugly

[–] asdfasdfasdf@lemmy.world 48 points 1 month ago (12 children)

Hard disagree. Super beautiful.

load more comments (12 replies)
[–] firelizzard@programming.dev 48 points 1 month ago (5 children)

Almost any language is ok but some ecosystems make me want to turn into a murder hobo (looking at you, JavaScript).

load more comments (5 replies)
[–] asudox@lemmy.asudox.dev 26 points 1 month ago (41 children)

what? what part of rust is ugly?

[–] UnderpantsWeevil@lemmy.world 21 points 1 month ago (4 children)

Maybe they're confusing the literal name with the language? Idk.

I grew up on Perl and holy fuck... Rust is fine.

[–] hellfire103@lemmy.ca 7 points 1 month ago

I'm learning Perl - purely for fun - and yeah... it's a little funky.

load more comments (3 replies)
load more comments (40 replies)
[–] Lembot_0006@programming.dev 22 points 1 month ago (9 children)

FORTRAN isn't a beauty either.
And Python is strange as hell with its mandatory tabs.

[–] bleistift2@sopuli.xyz 22 points 1 month ago (2 children)

You can use spaces in Python.

[–] marduk@lemmy.sdf.org 23 points 1 month ago (7 children)

Two, three or four spaces? If you answer wrong I'll never forgive you

[–] TeamAssimilation@infosec.pub 16 points 1 month ago

Whatever your place defines as a standard. I’ve seen ugly code in C, JavaScript, Java, etc., that uses them all over the place because they’re not mandatory.

If you don’t have consistent indenting, your code looks like copy/paste from several sources; but if you do have consistent indenting, then the indenting of Python is a non-issue.

[–] qjkxbmwvz@startrek.website 7 points 1 month ago (1 children)

Per the Linux kernel coding style:

Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.

[–] hemko@lemmy.dbzer0.com 8 points 1 month ago

First off, I’d suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it’s a great symbolic gesture.

[–] fartsparkles@lemmy.world 6 points 1 month ago

I’m rather partial to five myself but only when I’m feeling fancy.

load more comments (3 replies)
[–] firelizzard@programming.dev 12 points 1 month ago (2 children)

Indentation-driven control flow is one of the most cursed things ever invented, excluding things explicitly designed to inflict pain or death.

[–] CompactFlax@discuss.tchncs.de 8 points 1 month ago

White space sensitive languages are evil.

load more comments (1 replies)
[–] tyler@programming.dev 11 points 1 month ago (1 children)

List comprehensions are much stranger than tabs vs spaces. There are very very very few languages that use them, and python’s is by far the worst out of the popular ones.

[–] SaharaMaleikuhm@feddit.org 6 points 1 month ago (2 children)

Skill issue. Once you learn them they are quite fun.

[–] unit327@lemmy.zip 10 points 1 month ago

The concept of a list comprehenshion is sinple but syntax is awful, as if Yoda was writing a for loop. "x for x in y it is, hmm yes".

load more comments (1 replies)
load more comments (7 replies)
[–] BehindTheBarrier@programming.dev 20 points 1 month ago (6 children)

I can actually see where this is coming from, as I found Rust hard to read when I started out. I do really like Rust for reference, but I do agree Rust is hard to read for someone that has not learned it.

For example:

return statements that are implicit just because the semicolon isn't there. Even better if they occur inside a if block or something like that. Very hard to understanding when you don't know the syntax rules.

Lambda functions, especially when using move semantics too. They are quite simple, but if you don't know the meaning, it's more arcane characters. Especially when this is used inside lots of chained methods, and maybe a multi-line function in the lambda.

A lot for the if let x =... type of stataments are tough the first time around. Same for match statements.

Defining types for use with function::() and such.

Lifetimes, especially when they are all named a, b, c etc. It quickly gets messy, especially when combined with generics or explicitly defined types.

Macros, though not entry level rust to begin with, they are really cumbersome to decode.

None of these are sins of Rust, but for new people they are a hill to climb, and often hard to just "get" based on previous programming experience and reading the code. Rust can be really hard to approach because of these things. This happens in other languages too, but I do feel Rust has a particularly large amount of new concepts or ways to do something. And this is on top of learning lifetimes and borrow semantics.

[–] 5C5C5C@programming.dev 13 points 1 month ago

This is the most sober take in this thread. I was bothered by all these things you mentioned for the first two weeks of using the language. I begrudgingly accepted them for the following two months because I felt the benefits of the language were worth it. Now all of these things feel natural and I don't give them a second thought.

load more comments (5 replies)
[–] Sunrosa@lemmy.world 11 points 1 month ago (6 children)

One of the reasons i find it so hard to use non-Rust languages is how ugly they typically are by comparison. "fn" instead of "function" is such a great example of saving key presses where they're most needed. And you get very used to seeing compact abbreviations. Idk if that's what you're talking about though.

[–] 30p87@feddit.org 7 points 1 month ago (13 children)

Rust:

fn getofmylawn(lawn: Lawn) -> bool {
    lawn.remove()
}

C:

bool getofmylawn(Lawn lawn) {
    return lawn.remove();
}

With Rust you safe 1 char, and gain needing to skip a whole line to see what type something is.

load more comments (13 replies)
load more comments (5 replies)
[–] LiveLM@lemmy.zip 11 points 1 month ago (10 children)

Go look at that Lisp kojumbo then tell me Rust is ugly.

(defmethod wake ((object magic-packet) address port)
  (let* ((payload (encode-payload object))
         (size (length payload))
         (socket (usocket:socket-connect nil nil :protocol :datagram :element-type '(unsigned-byte 8))))
    (setf (usocket:socket-option socket :broadcast) t)
    (usocket:socket-send socket payload size :host address :port port)
    (usocket:socket-close socket)))

Actually unreadable.

[–] bigfondue@lemmy.world 8 points 1 month ago* (last edited 1 month ago)

Maybe Emacs has fried my brain, but that is perfectly readable. Common Lisp has one of the most advanced object systems around, so yea you can write hard to read stuff if you want

load more comments (9 replies)
[–] tomenzgg@midwest.social 6 points 1 month ago (5 children)

Not to stereotype too much but I think this is the first Blåhaj I've seen (in a programming context) that wasn't team Rust.

What your programming language of choice (if you don't mind sharing)?

load more comments (5 replies)
load more comments (1 replies)