3 ms·
I've been writing python for a longer amount of time. What makes python popular is it's the ease of use and debugging. It may not have been type safe but every
by corethree 3y ago
I've been writing python for a longer amount of time.
What makes python popular is it's the ease of use and debugging. It may not have been type safe but every time it crashed it's extremely easy to find out where and why it crashed. This is not the case languages like JavaScript or for even something like golang which is ironically type safe. I like to emphasize this here. It is more important for a language to be extremely clear about the origin and nature of a runtime error then it is to be type and statically safe. Look at C++. It has powerful static typing but is marred by seg faults and memory leaks which are hidden errors that are extremely hard to tease out.
That being said, modern python now has types. The bandaids on top of python from sheer coincidence turns it into a powerful scalable language for the web rather then an ugly patchwork.
The main problem with python right now would be the performance and the library ecosystem. Performance is of course mainly the gil and libraries are often written with tricks that make static typing impossible. It's just old tech debt getting in the way not the modern language itself. Linters should prevent anyone starting new code using those patterns again.
Other then that, pythons type system + checkers supports even sum types with exhaustive pattern matching added with extreme ease of debugging runtime errors makes python one of the best languages for big projects. That level of safety isn't even offered by go or typescript. The only alternatives are rust or haskell for sum types.
I highly disagree with you. Python is not without old tech debt warts holding it back, but overall it is a superior language.