4 ms·
Properties being private seems to give Java devs (and also PHP devs to a lesser extent) a false impression of security. The lack of public/private/protected is
by JodieBenitez 4y ago
Properties being private seems to give Java devs (and also PHP devs to a lesser extent) a false impression of security. The lack of public/private/protected is always a surprise to fellow programmers when I introduce them to Python, even though we still have conventions and it's never a problem in practice.
Culture, I guess...
- kaba0 4y agoI don’t know, it seems to be a significant reason why java codebases, no matter how bad and written by how many almost completely separate teams chug along for decades. Empirical evidence does show that Java is very good on the maintainability front:
- JodieBenitez 4y agoWe've all seen unmaintainable monstruosities in any language. I think maintainability is a subject that goes way beyond language features. But if I were to relate a language feature to maintainability, that would be proper typing, not variable accessibility. Even though it's not enforced at runtime, a Python code base with type hints makes a huge difference in maintainability compared to one without. Of course Java has that by default and it's nice.
- piva00 4y agoI use this argument quite often when someone jokingly snark about me working mostly with Java. It's not my favourite language, I've worked with quite a few others, Java has just been the most consistently less painful than anything else. Ecosystem is pretty good, dependency management works; refactorings are easy with modern tooling and the typing system also works fine. Yes, it's verbose as hell and you definitely will depend on some basic tooling to be productive, I've worked in monstrosities that we managed to strip out piecemeal and get the codebase in good shape and modernised, it does require time and an experienced team though. Like you mention, the systems keep chugging along, in places with good engineering practices it's also a given to keep updating those codebases, simplifying and it happens organically when systems are running for 8+ years with 20-30 different engineers rotating in/out during this time. It works, it's not beautiful, it's not concise. It has quirks and gotchas as any language, and requires tooling, but it's quite mature and modernised enough to be a safe bet for bigger projects. Better than any alternative I've had experience with at scale.