this post was submitted on 28 May 2025
729 points (96.3% liked)

Programmer Humor

23899 readers
993 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
 

Also, do y'all call main() in the if block or do you just put the code you want to run in the if block?

you are viewing a single comment's thread
view the rest of the comments
[–] qx128@lemmy.world 11 points 1 week ago (6 children)

Nothing prevents you from putting a call to “main()” in the global scope

[–] Static_Rocket@lemmy.world 7 points 1 week ago (1 children)

Just cross your fingers nobody attempts to import it...

[–] bastion 1 points 1 week ago

Due to the oneness of all things, I refuse to distinguish between library code and executable code. One and Zero are arbitrary limitations.

load more comments (4 replies)