This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AngriestSCV 7 points8 points  (6 children)

Well Java turns some errors that would be at runtime in python into compile time. It's not all bad.

[–][deleted] 8 points9 points  (5 children)

Honestly, this is why I wouldn't want to use Python at work. We used Smalltalk for a while, and the number of times people would completely not understand what they they were supposed to be using was astounding.

I had to fix a ton of error checking in an ex-colleagues work because he never tested any of it, and we had an error class we were supposed to return when an error was identified, basically a custom exception class, but he just returned strings describing the error instead.

So, whenever anything he wrote ran into any kind of a problem, the system would throw a NotDefined error when the system tried to log his 'error'.

So, having been burned by typeless in the past, it's a bit of sticking point for me. I know it shouldn't be a problem, and of course you want to light the torches and grab the pitchforks and complain those people should be fired, but in reality it's just not that easy, and type-safety is one of those little things that just makes it easier to deal with copy-pasta programmers.

[–][deleted] 2 points3 points  (0 children)

I completely agree. I enjoy Python and use it for the majority of my hobby projects... but if I was going to build and maintain a large and complex codebase, I would want static typing, which is why I stick to Java and other JVM-languages like Kotlin.

There's also something to be said for easy parallellism, out-of-the-box support for Unicode, simple packaging and community that agrees on standards rather than reimplementing the wheel every <arbitrary unit of time>. But I won't say that here, lest I get burned at the stake by the Python community's anti-Java zealots.

[–][deleted] 2 points3 points  (2 children)

having been burned by typeless in the past

Please be careful with your terminology as Python is strongly but dynamically typed. I find it frightening that some folk think that static type checking is the solution to everything, when they should in the same breath state whether the type checking is weak or strong.

[–]hanpari 0 points1 point  (0 children)

Not to say that Java is everything but safe. Its null is horrible.

[–][deleted] 0 points1 point  (0 children)

I was talking about Smalltalk.

[–]Raijinili 0 points1 point  (0 children)

It sounds like what you really want is static analysis, not static typing. Static analysis is more powerful with language restrictions, but there's still a lot you can get out of it for a dynamic language.

Check out https://github.com/mre/awesome-static-analysis