2 ms·
> but on average Java projects stay more readable, than, say, Python Can we say that is due to shepherding or rather that Java lays it's types bare for you any
by DerArzt 5y ago
> but on average Java projects stay more readable, than, say, Python
Can we say that is due to shepherding or rather that Java lays it's types bare for you any time you create or pass a variable? You can do this in python with type annotations, but since they aren't required a lot of dev's just don't. This leads to the code being harder to read in my opinion.
- gavinray 5y agoIn Java, everything is a class. Java didn't even have generics when it was released. Any sort of higher-order functions and support for anonymous function weren't introduced until Java 8 in 2014. Language debuted 1995, generics in 2004 (almost a decade!), and lambda/FP facilities in another 20 years. In Java, a public class has to have the same name as the file as well. You had a very constrained design space historically and some non-negotiable enforced conventions. It's similar to Go code, where most of it more-or-less looks the same and you can pick up most codebases and run with them if you're familiar with the language.