3 ms·
In practice the Python language is so easy that you rarely have bugs related to types. And when you got it, you find it out pretty early. Types are useful when
by sametmax 9y ago
In practice the Python language is so easy that you rarely have bugs related to types. And when you got it, you find it out pretty early.
Types are useful when you grow, but thinking that you can't do anything big and robust without it is ignoring all the people that actually do so.
Another thing is that the simplicity and power of Python leads to having a lot of libs that are actually clean and solid for a lot of stuff. If I need to create anything under 100000 vis/day, I'm 3 times faster than a Go or Java dev on the backend. Literally 3 times.
I also produce better results. With things like Django rest framework, I can get the same REST API, but all the edge cases will be way better handled, small error messages, multi type of auth, etc.
Those things exist because it's fast to code in Python. And yes, dynamic typing help with that a lot.
So yes, it's true I don't have as much code completion and I have to remember a bit more about the code, but it's an exchange I'm making.
When I want to scale up robustness, I use type hints with mypy and get a strong code completion on PyCharm.
- slackingoff2017 9y ago3 times faster with zero proof? Java has similar REST frameworks, notably Jersey and Spring Boot. There's also the Play/Dropwizard crowd and Vert.x . Look at spring boot code vs flask, it's almost identical. Java libraries, particularly those maintained by Google and other tech giants are some of the most solid code ever written. I doubt Python or any other language comes close to the quality of popular Java libraries. I still don't see how dynamic typing helps with speed? Any Decent IDE will fill in the types for you so you don't even need to key then mostly
- sametmax 9y agoThere is no proof of anything in any comments in this thread.
- slackingoff2017 9y agoHahaha yeah I just realized I've precipitated a classic flamewar, oops. I'll recuse myself from making further comments on this thread. :)
- ApolloFortyNine 9y agoActually develop in spring boot vs flask, and you'll see just how much faster it is to code in flask. Spring Boot has many peculiarities and boiler plate you have to deal with. Flask just works. >I doubt Python or any other language comes close to the quality of popular Java libraries. You complain about proof and then you throw out this line.