annotate src/java.html.luan @ 10:23ec74373183

add books
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 14 Apr 2022 14:50:48 -0600
parents e151eeda658c
children 9694eff797bf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local Io = require "luan:Io.luan"
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 local Http = require "luan:http/Http.luan"
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 local Shared = require "site:/lib/Shared.luan"
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 local head = Shared.head or error()
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 local existing_header = Shared.existing_header or error()
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 return function()
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 Io.stdout = Http.response.text_writer()
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 %>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 <!doctype html>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 <html>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 <head>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 <% head() %>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 <title>Reactionary Software - Java 8</title>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 <style>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 li {
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 margin-top: 8px;
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 }
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 </style>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 <head>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 <body>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 <% existing_header() %>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 <div content>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 <h1>Java 8</h1>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 <p>Java started in 1995 as a clean simple object-oriented language with garbage collection. It was good reactionary software, designed before modern programming ruined software. Java was a big improvement over C++ and I started using Java from the beginning.</p>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 <p>Java went through many releases. The last useful addition was in 2006 after which it only declined. The last usable release was Java 8 in 2014. After this, Java was totally ruined by modern programmers and became completely unusable. So I suggest using <a href="https://www.oracle.com/java/technologies/downloads/#java8">Java 8</a>.</p>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 <p>Here is the history of Java copied from <a href="https://old.reddit.com/r/GoodSoftware/comments/d40pz7/java/">here</a>:</p>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
35 <ul history>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
36 <li>Java 1.0 was release in 1995.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
37 <li>Java 1.1 (1997) added reflection which was good. It also added inner classes which had problems as I discussed <a href="https://old.reddit.com/r/GoodSoftware/comments/d3glp4/jave_inner_classes/">here</a>.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38 <li>Java 1.2 (1998) didn't change the language.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39 <li>Java 1.4 (2002) added "assert" which is harmless though I don't use it.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 <li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
41 Java 1.5 (2004) added many features.
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
42 <ul>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
43 <li>Added generics which is horrible mess. Some solution to generics was needed, but this overcomplicated disaster wasn't the right solution. To be honest, I haven't thought through how this should be done. But even C++'s approach is better than Java generics. My suggestion is to only use generics when it is painless. As soon as some complication arises, just dump generics instead of struggling to figure things out.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
44 <li>Added annotations. This is harmless and can be ignored. I have played with it but never found a real need for it.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
45 <li>Added autoboxing. I don't like this in theory, but in practice it seems harmless. I use it.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
46 <li>Added enumerations. This isn't too bad but I hardly use it.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
47 <li>Added varargs. This is a good feature.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
48 <li>Added the for-each loop. This is a good feature.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
49 <li>Added static imports. This is purely a bad feature. It does nothing but reduce readability and it should never be used.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
50 </ul>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
51 </li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
52 <li>Java 1.6 (2006) added the compiler API. This is a good feature and I use it to compile Luan.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
53 <li>Java 1.7 (2011) had no significant language changes.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
54 <li>Java 1.8 (2014) added lambda expressions which is a complete horror. I have never used them. They are basically depraved pseudo-closures implemented like broken anonymous inner classes. Besides suffering from all the flaws of inner classes, they are syntactically horrible and unreadable. And they don't conceptually fit in Java at all.</li>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
55 </ul>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
56
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
57 <p>I had read about later versions of Java and I knew that it was just getting worse. For example, local-variable type inference is a horrible idea. But when I finally tried to use Java 11, it was far worse than even I expected. They added a new horrible feature <a href="https://www.oracle.com/corporate/features/understanding-java-9-modules.html">Java Modules</a> that not only made Java very complicated, but also completely broke backward compatibility so this feature can't just be ignored. You can find the whole story <a href="https://saidit.net/s/programming/comments/8ddy/my_java_11_saga/">here</a>. This Java change was so horrible that even <a href="https://www.reddit.com/r/java/comments/9vmk0w/java_11_sucks_big_time/">some modern programmers complained</a>. The end result is that I will never use a Java version beyond Java 8, and Luan requires Java 8.</p>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
58
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
59 <p>This story of the destruction of Java by modern programmers applies to all projects being maintained by modern programmers. Modern programmers can only make software worse, so one should never upgrade any software being maintained by modern programmers. In the case of Java, I suggest sticking with <a href="https://www.oracle.com/java/technologies/downloads/#java8">Java 8</a>.</p>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
60 </div>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
61 </body>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
62 </html>
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
63 <%
e151eeda658c add java
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
64 end