#Java is really a badly designed language.

There is more than one way to do things. Should you use a factory or just new the object? Should you use “this” when referring to members or not?

It makes it hard to write simple, clean, and consistent code.

#cleancode #softwareengineering

@skwee357 Isn‘t this a result of the (intended) design as general purpose language? And of being 25 (?) years old?
Anyway, think it will not change in the near future.
Which languages are better designed according the criteria you mentioned?

@kDot I don’t know if this was intended, but I assume age is a big part of the mess that Java is.

But I also think #java took OOP too seriously with all the factories and other patterns.

A better designed language is obviously #rustlang which took all the best from all the languages. The code style is consistent, and reading different code based on rust, is familiar to a rust developer

@skwee357 @kDot

Although Java did take OOP as the one true paradigm, it also suffer from becoming available about the same time as the "Design Patterns" (Gang of Four) book.

Many developers at the time conflated OOP, Design Patterns, and good programming. The Java community (and books) capitalized on this confusion. This was marketing and education more than the actual design of the language. (I could comment on that, but maybe not today. 😏)

@gwadej @kDot That true!

And seeing how how Java tries to adopt modern paradigms like a lambda function that doesn’t accept a whole instance of a class, it seems like there is no going back and undoing the mess