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

I think this is really just a factor of what you're used to, because none of those Python examples seem like an issue to me, and the Perl examples seem much harder to parse. I personally prefer print as a function rather than a statement, and keeping most standard lib functionality in modules seems like the right choice for anything other than a DSL.

I agree scope leakage is a major stumbling block with Python for sure, but it only occurs with control-flow so rarely causes actual issues once you're aware of it. Aside from that my biggest qualms with Python are the typesystem and whitespace for scoping, but those two don't cause much trouble for typical scripting purposes.

And, for what it's worth, Python's f-strings have been the go-to string formatting approach since 2016 so your example becomes something like:

  print(f"Hello {name}")
Which is doubly nice because you can also use format specifiers and arbitrary expressions like so:

  >>> f"The current year is {datetime.now().year} and the value of pi is approximately: {22/7:.2f}"
  'The current year is 2022 and the value of pi is approximately: 3.14'


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: