3 ms·
Mainly the boilerplate other languages force upon you. Whenever i look at Java Code i start to chuckle. Its so much more information that you need to load into
by spdy 12y ago
Mainly the boilerplate other languages force upon you.
Whenever i look at Java Code i start to chuckle.
Its so much more information that you need to load into your head.
To quote a picture from the post:
https://www.paypal-engineering.com/wordpress/wp-content/uploads/2014/12/cpp_py_medium.png https://www.paypal-engineering.com/wordpress/wp-content/uplo...
And its not like you need static typing everywhere just in some places its better to enforce it for your own sanity. Type hinting looks like a good way to solve this problem in python.
- Retra 12y agoThat image isn't really a fair comparison (in that C++ / Java aren't the only statically typed languages.) I imagine a statically typed Python dialect would only have an extra 15 or so lines, and the benefits would be numerous. I love python as much as anyone, but having to keep a reference manual handy just to use someone's library because they had the audacity to use a variable is not my idea of a fun time. EDIT: I'm probably exaggerating too much. Would I use Python in a large, complicated, multi-developer project? Yes, I would. And my only real complaint would probably be that I like static typing so much that I'd miss it.
- viraptor 12y ago> I imagine a statically typed Python dialect would only have an extra 15 or so lines Actually you can have a statically typed Python if you want. Have a look at http://docs.cython.org/src/quickstart/cythonize.html http://docs.cython.org/src/quickstart/cythonize.html All type declarations are optional. It compiles modules to versions completely interoperable with the rest of Python code. They're importable, behave as you'd expect, etc.
- qubitcoder 12y agoConsider Haskell. It's about as anti-boilerplate as they come. And with automatic type inference.