this post was submitted on 16 Mar 2025
790 points (98.2% liked)

Programmer Humor

21706 readers
391 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
790
C++ (ani.social)
submitted 4 days ago* (last edited 4 days ago) by kiri@ani.social to c/programmer_humor@programming.dev
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] LPThinker@lemmy.world 20 points 4 days ago (1 children)

Congratulations, you've illustrated the difference between syntax and semantics. But any competent compiler also handles semantics (just in a separate phase of compilation), because that's necessary for any useful conversion to machine code, not to mention optimizations.

[โ€“] CanadaPlus@lemmy.sdf.org 1 points 4 days ago* (last edited 4 days ago)

It's more like they handle a smaller, toy version of semantics that you can actually code a compiler for. In OP, something semantically correct in that version but not by common sense was accidentally written.

Maybe an early LLM that talks about picking up fire would be a better analogy.