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

Programmer Humor

24670 readers
300 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 month ago (6 children)

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

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

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

[–] bastion@feddit.nl 1 points 1 month 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)