{"id":6824,"date":"2026-02-12T12:32:53","date_gmt":"2026-02-12T20:32:53","guid":{"rendered":"https:\/\/blackcap.name\/blog\/new\/?p=6824"},"modified":"2026-02-12T12:46:10","modified_gmt":"2026-02-12T20:46:10","slug":"what-i-hate-about-java","status":"publish","type":"post","link":"https:\/\/blackcap.name\/blog\/new\/?p=6824","title":{"rendered":"What I Hate about Java"},"content":{"rendered":"\n<p>Consider a common programming task: open a text file for reading with buffering. Let&#8217;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.)<\/p>\n\n\n\n<p>First, the non-Java languages.<\/p>\n\n\n\n<p>BASIC-PLUS:<br><code>    OPEN \"FILE.TXT\" FOR INPUT AS FILE #1%<\/code><\/p>\n\n\n\n<p>FORTRAN:<br><code>    OPEN(UNIT=1,FILE='FILE.TXT',STATUS='OLD')<\/code><\/p>\n\n\n\n<p>Pascal:<br><code>    assign(file1, 'file.txt');<\/code><\/p>\n\n\n\n<p>C:<br><code>    FILE *file1 = fopen(\"file.txt\", \"r\");<\/code><\/p>\n\n\n\n<p>Perl:<br><code>open(FILE1, '&lt;file.txt');<\/code><\/p>\n\n\n\n<p>Python:<br><code>    file1 = open(\"file.txt\", \"r\")<\/code><\/p>\n\n\n\n<p>C#:<br><code>    var file1 = new StreamReader(\"file.txt\");<\/code><\/p>\n\n\n\n<p>And then we have Java:<br><code>    var file1 = new BufferedReader(new FileReader(\"file.txt\"));<\/code><\/p>\n\n\n\n<p>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?<\/p>\n\n\n\n<p>Why can&#8217;t Java do out-of-the-box <em>today<\/em> in one simple step what FORTRAN could do <em>in 1966<\/em>?<\/p>\n\n\n\n<p>And don&#8217;t say &#8220;object orientation.&#8221; Python and C# are object-oriented, and don&#8217;t have this programmer-hostile silliness.<\/p>\n\n\n\n<p>Sure, this seems to be a little thing, and it is just one thing. But it&#8217;s not really just one thing: this sort of crap is <em>all over the map<\/em> in the Java world. <em>Everything<\/em> is clunkier and more awkward than it should be, everywhere. It&#8217;s relentless. It&#8217;s wearing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Consider a common programming task: open a text file for reading with buffering. Let&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-6824","post","type-post","status-publish","format-standard","hentry","category-computers"],"_links":{"self":[{"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=\/wp\/v2\/posts\/6824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6824"}],"version-history":[{"count":4,"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=\/wp\/v2\/posts\/6824\/revisions"}],"predecessor-version":[{"id":6828,"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=\/wp\/v2\/posts\/6824\/revisions\/6828"}],"wp:attachment":[{"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blackcap.name\/blog\/new\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}