Hacker News new | past | comments | ask | show | jobs | submit login

This is accurate, but it leaves out something worth note: types can reduce the scope of validation needed. That's still a worthwhile outcome to work towards.



Doing application programming in Python now after some years of Scala, the uncertainty when I'm looking at code is overwhelming. What type will this argument be? Any type. What fields are optional in this record? All of them. Is this variable bound here? It depends. Will this line of code be executed on a computer? Maybe, but the next line of code may be daydreamed by a taco.

There are ways to fight against this uncertainty (Pydantic, etc.) but you learn to unit test every little damn thing.

Scala will make you feel stupid sometimes because you don't understand the ideas underlying a piece of code, but a language like Python makes you discount your ability to know anything. A line of code "x = y" might be exercised by three different unit tests, but maybe they didn't follow that one code path where y is never bound. I get more paranoid about simplifying logic in Python than I ever did in Scala. Reading other people's code is like being a jaded detective in a noir film. The function parameter is named user_count, but the last time you assumed a parameter like that was a number, you took a blackjack to the back of the head and woke up wanted for murder.

This is just an observation about one narrow aspect of Python, by the way. I'm productive in Python, it's fun, and it's an amazing experience. The feeling of proximity to power with Python is unrivaled.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: