1. no unsigned integers
2. no freestanding functions
3. pom files are a huge pain
4. the com.blah.blah.blah ridiculously long package path precedent makes it awful to work with if you don't have an ide
5. you can't actually use javac to compile your code. everything is so big and complicated you have to use ant, gradle, maven, etc.
6. too much boilerplate. "public static void main" etc.
There's a few more, but they'd take more than a sentence to explain.
technically, char is unsigned. For practical purposes use ByteBuffer.
>no freestanding functions
you can "import static" all the static functions you want; it's not any different than C, where you need to include the headers.
> pom files are a huge pain
That has nothing to do w/ java, itself, like at all.
>you can't actually use javac to compile your code. everything is so big and complicated you have to use ant, gradle, maven, etc.
If you use ant, how did you get to use pom? That's pretty much saying that using 'make' is terrible. For personal projects that involve no web, I don't quite need anything else but the JDK, itself. In that case, it's totally doable to call javac form the command line.
Write class Hello { public static void main(String[] args) { … }} into a Hello.java file and issue java Hello.java and it will compile and run your code. It hardly gets easier than that.
Also, it’s a bit unfair mixing in build tools for beginner courses - I doubt beginners start with python virtual envs either. And then don’t get me started on the multi giga node folder hell that you get from a simple Js project.
You could say the class should've been taught better, or that the students just weren't good enough, but I think a good tool (programming language) should help users, not be a barrier to overcome. Programming in Java doesn't require too many concepts, but you have to start with all of them at once, and I think some students just never got over that initial step.
It's of course debatable whether another language would have been better or whether Java really contributed to the problem, but I think we can agree there are languages that better lend themselves to teaching complete beginners.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
vs print("Hello, world!")
Please comment again if you still cannot see the bloat/unnecessary verbosity.Or where is the import to get "System" into scope? It's imported globally everywhere (just like all everything from java.lang).
So the only question is: should "print" be burried under layers or not. I don't think the advantages of burrying are really worth it.
Apart from that it is really unintuitive to have something "static" within a class (which is commonly understand as a template), it is not encapsulated because it is static _and_ public. _And_ now you can search for this thing everywhere - and what happens if you find two of them?
Yeah no, the idea of "public static void main" wasn't a great one, no matter how I look at it.
It's much better to be explicit and ask the user to decide which file they want to use as the starting point.
> Of course implicit imports are needed, like what else would you have without
They are of course not needed. You could also just import everything manually. Okay, Java's import suck, but in a better language you could do "import prelude._" in the beginning of every file and otherwise you are left with keywords only. Not saying that's a great idea, but it certainly can work without implicit imports.
https://en.wikipedia.org/wiki/Criticism_of_Java#:~:text=The%...
https://www.quora.com/Why-did-Alan-Kay-dislike-Java
https://vic.nightfall.moe/2016/04/03/Some-reasons-why-I-hate...
https://developers.slashdot.org/story/08/01/08/0348239/profe...
I agree with those reasons and I’ve always felt Java sucks because of them. When Java first came out I was a C/C++ programmer and was excited to learn it. Very quickly became disillusioned because it was incredibly verbose. I hoped the language would evolve quickly but it took FOREVER. Meanwhile Microsoft introduced C#, whose v1 looked like a copy of Java, and very quickly evolved the language to make it much better. They did what I hoped Sun Micro would do. But Sun just sat there and twiddled their thumbs.