What I Hate about Java

Published at 12:32 on 12 February 2026

Consider a common programming task: open a text file for reading with buffering. Let’s go through some of the programming languages I have used, in rough order of my learning them. (Disclaimer: my memory is a little rusty on some of these; they may not all be 100% correct. But they are not that far off the mark.)

First, the non-Java languages.

BASIC-PLUS:
OPEN "FILE.TXT" FOR INPUT AS FILE #1%

FORTRAN:
OPEN(UNIT=1,FILE='FILE.TXT',STATUS='OLD')

Pascal:
assign(file1, 'file.txt');

C:
FILE *file1 = fopen("file.txt", "r");

Perl:
open(FILE1, '<file.txt');

Python:
file1 = open("file.txt", "r")

C#:
var file1 = new StreamReader("file.txt");

And then we have Java:
var file1 = new BufferedReader(new FileReader("file.txt"));

LOL, what? Why should those internals be exposed? Why should I have to explicitly wrap an unbuffered reader in a buffering one? Why the extra step to do something so common and routine? Why did I just have to spend a half hour studying the documentation, chasing from class to class to class, to figure out how to do something that was almost self-evident in every other language I was learning?

Why can’t Java do out-of-the-box today in one simple step what FORTRAN could do in 1966?

And don’t say “object orientation.” Python and C# are object-oriented, and don’t have this programmer-hostile silliness.

Sure, this seems to be a little thing, and it is just one thing. But it’s not really just one thing: this sort of crap is all over the map in the Java world. Everything is clunkier and more awkward than it should be, everywhere. It’s relentless. It’s wearing.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.