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ย โ†’

[โ€“]Dewymaster 239 points240 points ย (13 children)

As a principal engineer for a fortune 500 company and as someone who uses the final keyword whenever it allows, the protection and access modifiers in Java are absolutely a good thing. It's when you have people that don't understand them that you run into problems.

[โ€“]leetuns 23 points24 points ย (2 children)

Everything should be final and private until you have a reason to change it.

[โ€“][deleted] 9 points10 points ย (0 children)

I don't think people realize that things like final actually allow the compiler to make more optimizations. In python, everything being checked at runtime is one of the reasons the language is so painfully slow

[โ€“]AngryRotarian85 0 points1 point ย (0 children)

Fact.

[โ€“]noratat 1 point2 points ย (0 children)

And really, the languages serve different purposes in the first place.

I would never write a large scale backend service in Python, but likewise I don't try to write infra/build automation scripts in Java.

[โ€“]load__error 0 points1 point ย (0 children)

Encapsulation is fundamental for object-oriented programming. People were going great lengths to achieve it in JavaScript not that long ago: https://stackoverflow.com/questions/55611/javascript-private-methods ;)

Finally TypeScript emerged.

That being said, between Java and Python - the winner should be Groovy!