228
Python needs an actual default function
(lemmy.ml)
Post funny things about programming here! (Or just rant about your favourite programming language.)
They do different things lol
The main functions define entry points and the python example executes the code only if that script was invoked directly
Agreed, when building the wheel in python we can also define entry points like a main function, and run it the same way the compiled C code is run.
These people are comparing the interpreted raw python code to a compiled C binary. My dudes, bash doesn't have a main function either and no one is fucking complaining.
I don't see a lot of people building web servers in Bash. I think part of the point is that Python is a scripting language that likes to cosplay as a GPL.
Do you know the difference between a script and a program?
A script is what you give the actors; a program is what you give the audience.