this post was submitted on 09 Oct 2026
870 points (97.7% liked)

Programmer Humor

33565 readers
1040 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 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] palordrolap@fedia.io 8 points 1 day ago (2 children)
because some languages allow you to write statements  
    that wrap over multiple lines
        in order to space things out that would
            otherwise be crammed onto one line,
    so for the compiler to know when the statement ends
        a character is needed so that it doesn't think the next line
            is part of the previous;
statement number 2 goes here

Without that semicolon, you might have continued to read "previous statement" which makes sense at first, until the words that follow.

Without the allowance for multiple lines in one statement, that second physical line makes no sense at all, despite the first one making perfect sense on its own.

And without the spacing, the run-on sentence would be a lot harder to read.

Sometimes you have to write code a particular way. Here I was making a point. In a programming language there are other reasons.

[–] Fizz@lemmy.nz 2 points 1 day ago

Oh that makes sense thank you for the explanation.

[–] esc@piefed.social 2 points 1 day ago

Python allows multiline statements with explicit \ and inside (), [], {} implicitly.