Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JavaScript is full of idiosyncrasies.


What drives me nuts about doing JS is that the browser execution model seems vague.

In python, I can have the

if __name__=='__main__': main()

at the end if a script, and easily import the script's functions into

- pytest for testing

- some other module for larger modules

- into a cli.py file to slap a Click interface on it.

What a great blend of flexibility while retaining coherence.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: