Why Java was the target language I hate

Introduction

Cats write C # as their favorite language and Java as their disliked language on their profile. Apart from that, I don't really have an attachment to Microsoft. Before touching C #, he suffered from the pain of pointers in C language, hated Java where he escaped for the following reasons, and was impressed by Delphi, so he liked this language. It may be one of the reasons. There are a lot of experienced programmers in this Qiita, so I think that there are people who will agree with me and people who dislike it, so I will write down the reason why I disliked it.

I have a hard time with the basic operation of byte array

It is a data string in which a number of 1-byte (8-bit) data are arranged in a byte array. Bytes usually handle numbers from 0 to 255. Not surprisingly, most languages, including C, can easily handle byte arrays ... (mostly experienced languages can).

unsigned char color[3];

Or

byte[] color = new byte[3];

Or

$color = [ 255, 255, 255 ]; // (Hmm? I feel something different)

Or the writing style may change. However, you can create an array that handles 0-255 properly.

However, it's a language I hated, like the C # language.

byte[] color = { 126, 127, 235 };

But I don't get the results I expected in Java. Java cannot define unsigned types (commonly known as unsigned). I heard that I need to use a class or a short or int, so I have a lot of trouble with conversion and I don't want to use it! I thought. However, Java these days is probably possible! There may be a reaction. I haven't touched this for more than 10 years, so what about it?

So that's one of the reasons I hated it. (Still there ...)

Hierarchy + class = file

Basically, only one class can be defined in one file. I think I could have built in subclass-like things, but there was only one. If you create a class, the number of files will increase. Whether you want to create a class that is just an interface that doesn't do anything, or a prototype class .... File mass production. And it was a pain because the hierarchy also affected (* 10 years ago). I wonder if it is still the case ...

Installation and IDE are painful

At that time, I was using Eclipse for development. It may not be mainstream anymore, but it also kills Windows and dies every time it compiles. Harassment just asking you to do it on the console. Before that, I feel like I was dead by the time I put in the JDK ...

Around this time, Microsoft .NET Framework 1.0 was released, and I was touching it at the same time, but as a result, I came to the conclusion that VS is the strongest, and eventually I started playing with C # WindowsForm without using Java, as it is. Delphi's Windows App Development If you enjoyed the language itself while wandering around in a style that was too easy, PHP, D language, etc., you wouldn't use Java for a few years.

Java for android

I used to use Java at work a few years ago. Yes, I was annoyed by the byte array again, and because I didn't have Android Studio yet, I was crying in Eclipse and ended up hating it ...

Summary

A Java language that has been acquired by Oracle, paid for, and swayed. And to C #, which is evolving by incorporating the good points of various languages ... Java, which has a language specification that I do not understand well trying to catch up. If you are asked to do native development on Android, press Kotlin or Xamarin (C #). Java was already full, which was the reason I hated it.

Recommended Posts

Why Java was the target language I hate
[Java] I implemented the combination.
I studied the constructor (java)
I tried the Java framework "Quarkus"
Java9 was included, so I tried jshell.
I tried the new era in Java
[day: 5] I summarized the basics of Java
I was addicted to the roll method
[Java] I personally summarized the basic grammar.
I was addicted to the Spring-Batch test
I went to the Java Women's Club # 1
Why was the code painful to read?
I compared the characteristics of Java and .NET
I touched on the new features of Java 15
Try the free version of Progate [Java I]
The part I was addicted to in "Introduction to Ajax in Java Web Applications" of NetBeans
I was addicted to the NoSuchMethodError in Cloud Endpoints
[Java] I want to calculate the difference from the date
I was addicted to the record of the associated model
I couldn't run it after upgrading the Java version
[Ruby] Misunderstanding that I was using the module [Beginner]
I summarized the types and basics of Java exceptions
I tried to implement the Euclidean algorithm in Java
The mysterious java.exe was the reason why javac and java versions could not be matched no matter how many times I tried.