Java is more explicit or verbose. For experienced people, that looks like clutter (and it is, I am an Android dev), but that verbosity might be useful for people just starting out.
Yeah - I kind of appreciate that I spent a decent amount of time in a statically typed language before moving to Python. I find that way too many Python newbies don't understand what 'types' are and this leads them down the path of just trying random things until code works.
The next step is to realise that just knowing about types isn't enough when your program gets big enough. When your program is too big for your head, you need tools which robustly and unambiguously understand your types... like a compiler does.
Python is a fun toy, and good for small projects where rigor isn't important. Its leakage into large scale software engineering has been a huge retrograde step, though, caused by a lack of innovation in the field around the time it emerged as a contender around 10 years ago. Fortunately we've moved on, and I look forward to Python's death for large projects as others take over, probably Go.
Like MyPy does. You want strict typing, you can do it fine. It's done better than it is for most languages (Looking at you C#. Still waiting for nullability for everything) It's not enforced at runtime (even though runtime type checking exists, it shouldn't be needed if it passes a static type checker), it just shows errors when you fuck up.
reference types (ie classes) can be null, but currently can't be typed as possibly null. The benefit would come from saying that a certain thing can never be null in the type system, which you can't do in C# now
38
u/weasdasfa Jan 05 '18
Java is more explicit or verbose. For experienced people, that looks like clutter (and it is, I am an Android dev), but that verbosity might be useful for people just starting out.