Why do they still teach Java if everyone hates it so much?

1 points by josmek ↗ HN
I'm currently a high school senior and in my school's AP Computer Science class. I started programming in Java a few years ago and I have loved programming ever since. Sure I'm not doing anything very important with it in school, but I haven't found much to dislike about Java.

From what I usually read on the internet it seems that people like to criticize Java in different ways. So why is Java the language taught in College Board's AP Computer Science program to high school students?

3 comments

[ 2.6 ms ] story [ 15.0 ms ] thread
The thing is java isn't universally hated. Hating Java is cool. Like hating FORTRAN 30 years ago. It works, it works, very well in most cases. Its performance is comparable to compiled languages.

Its just, hating java is currently 'in'. Why? Because its popular, and everywhere. So not being java, is currently considered a boost to your language, because after you work in java all day, who wants to go home and write... more java?

It takes a long time for widespread adoption of a programming language in schools. 15-20 years ago you likely would have seen some mix of Pascal and C++. Pascal came into popularity as it was pushed expressly as a teaching language. For learning basic principles of computer programming, it was fair enough, but its fan base dwindled over time, and never was a great candidate to use outside of the classroom.

C++ was (and is) broadly used in real applications, but is also a mess for beginners to learn.

Java was a reasonably decent choice to move to: it was more beginner-friendly than C++, and, thanks to most excellent marketing from Sun Microsystems, it quickly became entrenched in numerous corporations as a replacement for COBOL and for building web applications, making it useful to learn for programming outside of class.

Looking back on the late 1990s, the Java bandwagon was intense. It was being pushed all over the place, by people both in industry and academia. It was definitely an improvement for many programmers; depending on what kind of software you were writing, Java could have been a huge benefit over C or C++. Much of its praise was well-deserved, but I don't think I've seen a programming platform pushed so hard and so loud since then.

What's in the AP classes today is a direct result of the Java fanfare of ~15 years ago. It will almost certainly change again, but in the meantime, despite numerous criticisms online (many of which are probably true), it's not a bad language. It's just not particularly interesting, and is sometimes annoying, for many people who have come to favor programming in other languages.

The same features that make lots of people dislike working with Java, in terms of strictness, etc. (in addition to being things other people like about Java for large projects) can be useful in some teaching models in a pedagogical language (its worth noting that, while the particular features are somewhat difference, they are the same kind of things lots of people thought made Pascal -- an older popular-for-teaching language -- less than ideal for pragmatic work.)