Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()

<- View Parent
thebestaquaman@lemmy.world ⁨5⁩ ⁨days⁩ ago

I really do agree on all your points, so at the end of the day I think a lot comes down to use-case and personal preference.

My primary use cases for Python are prototyping and as a frontend/scripting tool for software written in C/C++/Fortran. I’ve written/worked on only one larger code base in pure Python, and my personal opinion became that I heavily prefer strictly typed languages once the code base exceeds a certain size. It just feels so much smoother to work with when I have actual guarantees that are enforced by the language.

With that said, we were a bunch of people that are used to using Python for prototyping that developed this larger library, and it would probably have gone a lot better if we actually enforced use of proper type hinting from the start (which we were not used to).

source
Sort:hotnewtop