News for hackers. Stuff that matters.
Re:An exploration of why Python doesn't require a 'main' fun... by uryga on Tuesday July 21, 2020 @01:34PM (#23908887)
> especially in contrast with c and other languages that shoehorn you into defining a main function

i don't think that's a problem in languages with namespaces/modules -- a module might define a main(), it just wouldn't be used when it's imported. (unless you're in C, then you'd get a name clash)

Re:An exploration of why Python doesn't require a 'main' fun... by klyrs on Tuesday July 21, 2020 @01:51PM (#23909074)
That's a great point... with a small caveat that some people abuse namespaces badly and clashes may still occur.
Re:An exploration of why Python doesn't require a 'main' fun... by wwright on Tuesday July 21, 2020 @03:14PM (#23909921)
You actually can define `main` in a library, as long as you handle the symbols right.