Posted: Nov 30, 2017 9:09 am
by VazScep
Matthew Shute wrote:
VazScep wrote:
SpeedOfSound wrote:Wow. You do know that java is ontologically nothing more than despair right? :smoke:

I'll take a look. Maybe convert it to kotlin.
The famous old blog post says that Java is ontologically the Kingdom of Nouns.


The nouns in Javaland do allow verbs to drive, but the verbs generally have to be accompanied by a noun relative at all times. If we want to subvert the status quo in the Kingdom, about the best we can do is put the nouns in burquas or otherwise keep them out of sight. It's not exactly ideal, having to actively oppress the nouns just to give the verbs some breathing space.

Code: Select all
public class LessMonarchicSyntax {
   
   public static void print(String s) {
      System.out.print(s); // Let that verb show its face in public unaccompained, paternalistic noun!
      // I'm forced to call you, nannying System, but we can at least avoid seeing you after this!
   }

}


Code: Select all
public class HelloWorld extends LessMonarchicSyntax {

   public static void main(String[] args) {
      print("Hello, World");
   }
   
}
One of the most successful of the non-Java JVM languages is Clojure, a Lisp dialect which massively favours functions and is pretty hostile to OOP. I remember an old lecture by its creator talking about his early steps towards Clojure, and he was explaining how, in his latter days as a Java dev, he was writing static methods almost exclusively.

I hope he didn't have to work with others. I can't imagine many other Java devs getting on board with that style of coding.