- cross-posted to:
- programmer_humor@programming.dev
- cross-posted to:
- programmer_humor@programming.dev
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?
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?
I’m gonna repeat what I wrote in another comment. You are comparing the default interpreted way of running python
gto a compiled language. When you compile a python program into a wheel, you define the entry points of the code on it, and they point to functions like main() or whatever you define.You aren’t complaining that a index.js doesn’t automatically run the main function when run by node, or that bash doesn’t also have a default main function execution. Interpreted languages oriented to scripting won’t have the same rules as compiled languages.
programming languages aren’t usually cursed, what’s cursed is the way some people decide to structure their programs. I’ve seen some stuff.
Glad to see I’m not the only one who can’t type python without Sigmund waving hello.
It’s my fucking keyboard. I’m all in for open source and stuff but it’s too much, I had to go back to proprietary ones because the other ones just suck for multi language inputs :(
Some programming languages are indeed cursed (e.g. JavaScript). But for the most part I agree, it’s what people do with it. But what’s cursed with python is what idioms have become common place.