this post was submitted on 28 May 2025
706 points (96.2% liked)
Programmer Humor
23563 readers
1094 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes, because
Note the "I have the flow of execution", and the "if I want to build a library".
If you just want to build an executable, do as you wish, you already have the flow of execution.
If you want to build a library, make the relevant classes and functions and get out of the way (i.e., no IO, no long-running tasks).
If you want to combine them, use the main name check - or, make a package and do entry points that way. Either way works, because both can fulfill the goal of staying out of the way of those importing this as a library.