5 ms·
Java has a high bar for the amount of prerequisite experience it takes to write good code. In other words, it has too many pitfalls for beginners. It is a pheno
by oftenwrong 5y ago
Java has a high bar for the amount of prerequisite experience it takes to write good code. In other words, it has too many pitfalls for beginners. It is a phenomenally poor choice of language for teaching beginners to code.
On the other hand, a lack of beginner-friendliness could also be seen as a lack of effective static analysis. Of course, this is a very Java programmer point-of-view.
Others: "you shouldn't need to have that"
Java programmers: "but I do have that"
If you are in a position to pick tools for your organisation, think about how your choices would accommodate beginners. Not all of your tools can be or should be easy for beginners to use, but it is an important quality to consider.
- tasha0663 5y agoI'm curious what these pitfalls are that you're referring to. Can you elaborate? It's been a long time since I was new to Java, and this sort of outside perspective is always a good thing.
- chakkepolja 5y agoMaybe GP is talking about type erasure, or considering the mention of teaching, it might be something more obvious like reference type vs value type distinction, strings cannot be compared using ==, etc..
- 62951413 5y agoJava ain't no Scala to have any unusual prerequisites. It was designed as the golang of the day and that still shows in its lack of particularly sophisticated features. Speaking of beginners, I'd venture to say that Java has the largest library by now. From Core Java to Java Concurrency in Practice, pretty much everything was well described years ago. The same is true about Design Patterns/Refactoring/DDD-related literature which was originally popularized mostly in the Java world. I actually agree that JVM-like platforms should not be used for teaching beginners. Something like Python (or TypeScript?) is probably appropriate for high school usage. In my time it was Borland Pascal which was a nice first real language and a great IDE. All on a single floppy disk :))) I
- zmmmmm 5y ago> lack of beginner-friendliness could also be seen as a lack of effective static analysis Slightly confusing comment to me ... Java has on the one hand a relatively simplistic static typing system but on the other hand some of the best static analysis support that you can find (I don't think it's a coincidence; the relatively simple type system and lack of ways to hack around it facilitates the strength of the analysis that can be done). I'm talking about things like, add a parameter to a method in a library and eclipse automatically not only deterministically renames it everywhere that its called in the library but in every dependent project, all in milliseconds. And a dozen other similar types of operations.
- oftenwrong 5y agoIn hindsight, I understand your confusion. I agree with your comment. Without static analysis tools like error-prone, findbugs, nullaway, checker framework, sonar, PMD, IDE-provided analysers, et cetera, it is easy to write problematic Java. On the other hand, the Java ecosystem has an abundance of such tools available and almost everybody is using them. (Hence, "but I do have that")