"I wonder if I should throw away Java and shake it to C #" I was asked "Isn't JS still better with node? Or rather, what happens when the result of escaping from Oracle goes to MS?" After answering, I thought it would be better to think a little more, so I think about it.
Although the author is a race that has had a lot of Java work for various reasons, he basically dislikes Java and dislikes Oracle [^ 1], so there is a high possibility that the consideration is strongly biased. I would like to add.
TL; DR
"What are Java's strengths?" Perhaps Java's early days were more "object-oriented". Because of the machine spec problem, the burden on the JVM was relatively heavy. Languages that use the runtime have to overcome the problem of "the runtime itself is heavy", but the JVM was particularly painful. At that time, the late Sun Microsystems said "Write once, run anywhere", which was only an excuse for "slow but forgive".
So what happens if you answer this question now? Needless to think. "Write once, run anywhere". Definitely this. Strictly speaking, it is the "Java VM infrastructure" that holds this. Computer specifications have been upgraded due to advances in semiconductor technology, and now it is no longer a burden like the JVM. Java is now a kind of VM container and the infrastructure mechanism that is based on it, like Docker.
Any code will run in the Java VM as long as it is Java. The Java VM will be supplied to any machine. It's also free. So Java works everywhere. "Write once, run anywhere".
It may not be accurate because I haven't investigated it in detail, but this is probably the reason why Oracle played a fight with Google. Even though it's a mess around a series of Java VMs that started with Apache Hermony, it's something that "takes over" the supply of VMs, or otherwise destroys a single VM situation and makes it "difficult". It was a fatal problem.
Why is it deadly? ** Java now has no strengths other than VM ** (and existing assets) **. …… Because object-oriented languages are commonplace today. It can not be helped.
Due to its structure, Java requires a Java VM. The difference between Java VM and its runtimes is that they are separated to the extent that they call themselves "VM", and what they read is Java bytecode, the machine language for the JVM.
This method
On the other hand
It also has the drawback of.
Among the drawbacks, the machine power problem was resolved in time. The machine power itself has been enhanced, the VM has advanced, and the code optimization has become more powerful. Of course, this is the same for languages that use interpreters, but the speed is still not defeated. Compared to "really fast" languages like C / C ++, it's like a light tiger vs a jet fighter, but on the contrary, it's easier.
By the way, whether it's Sun or Oracle, it's a for-profit company, although its name is huge. ** How are you going to make money with this? ** **
The strength of Java is the infrastructure itself called Java VM. However, the residents of some island nations who suffered the great earthquake immediately after the change of government cut infrastructure costs will be familiar with it. Nothing costs more than building infrastructure.
Java is, by all accounts, a huge debt-for Oracle.
That is why it is a policy change, so-called "payment". The roads that everyone runs on, the air that everyone breathes, and the fact that you can make a profit no matter how much you pay for it. This is bad on the side that has penetrated that far. You shouldn't say this anyway because the other party is also doing it for profit, but rather if it is appropriate, the price should be paid.
In other words, Java's greatest weakness is its dependence on the infrastructure of the Java VM. ** Java's greatest strength, "infrastructure that can be used anywhere" Java VM is its greatest weakness, depending on Java VM and, by extension, Oracle **. ... or rather, * that's why it's making a lot of noise now *. In fact, the fact that Java will be charged is heavy. This is because the advantage of "free, you can use infrastructure that works relatively without thinking about difficult things" is lost.
However, it was often said that Java, especially the standard API design, was old-fashioned and moldy [^ 4]. In fact, Java's language specifications and other characteristics were up-to-date at the time, but now it's an antique that has been overtaken by countless followers. Java 8/9/10/11 and refinement continued, and although the inconvenient and barren parts have been improved one after another, the wrinkle of the problem that the fundamental antiquity can not be thrown away causes various problems. It's been a long time [^ 5].
** There is no language that can completely replace Java ** [^ 6]. No matter how fast programming is evolving
...... There is probably no language in the world that meets all these requirements. It may be natural. For Java, the Java VM was that strong. But for that matter, * we were so dependent on Oracle *.
** We have to kill the illusion that we can deal with almost anything in a single language **. Whether to throw away Java? It is not. ** Which language to consider in which field and how much to do in which language to focus on or not in which field **.
So I'm going to list some languages that are likely to be "partially" alternatives to Java. Fortunately, Java (and in a sense its predecessor C / C ++ and its ancestor ALGOL) was so powerful that many of the things in use today are easy to convert.
C#[^9] It may be said that it became the masterpiece that started writing this article. Made by Microsoft. Originally, there was a time when he called himself C # .net as well as around VB.net, and it is rumored that he was actually willing to C # not only in the .net area [^ 10].
The downside is that, as I mentioned at the beginning, ** escape from Oracle and get caught by MS **, and ** Xamarin is still narrowly available **. After all, the home of .net is Windows. I hear that it is not incompatible with Sharepoint etc. as the same MS product. However, the trouble is that those "options" are terribly subtle, expensive, and heavy and heavy in the first place. Sharepoint? Office? So how much does it cost to solve one problem?
If you're migrating from Java to C #, there's one reason-- ** C # is closer to Java **. According to one theory, it is said that it is due to the blood of the MS version of Java and J #, but it is also the same in the sense that it entrusts its life to one giant company. Conversely, if you're going to be wrapped up in such a giant company, it might be an option.
Ruby An object-oriented scripting language that is also known to be domestic. Originally, it was supposed to be used in the shell, and in fact, anything that even has an embedded implementation is an ant language. …… But it goes without saying that it is known for the Web.
So why did it spread as a language for the Web? This is definitely Probably due to the popularity of Ruby on Rails, also known as RoR. The selling point was that Rails could be developed at a tremendous speed as long as it followed that style and thought. It became an explosive epidemic when it was awarded the "Good Hack" by Google at the time, and spread all over the world.
And as a result, the Rails community has deteriorated rapidly.
There are terrible jokes like Zed Shaw's "Rails is a ghetto" in 2008, or "Ruby isn't Matz's invention, it's the original of DHH [^ 11]". As [^ 12], the quality of the community itself has died. As a result of many people moving away from Rails and Ruby, the red gems that swept the world, albeit temporarily, are quickly returning to Japan's locals-which is clearly an overstatement, but , The overseas Ruby community itself seems to be weakening [^ 13].
If you go from Java to Ruby, it's probably the case when you focus on the Web. When choosing Ruby to do something other than the Web, how to find that material can be a problem. In the first place, there is a possibility that you will get a reaction like "What is non-Web in Ruby?" However, if it is based in a very limited region (specifically Shimane Prefecture), it may be politically powerful in some cases [^ 14].
JavaScript By Netscape Communications, Brendan Eich. It is probably the scripting language that appeared as a function of Netscape Navigator, also known as Neske, and is probably the most frequently touched processing system [^ 15] for modern people. After standardization by ECMA and server-side advancement by Node, it may be said that it has finally powered up from "browser language" to "general-purpose language".
Node is currently very powerful and has a wide variety of modules. I can't deny the feeling that the Web is my main business because I'm from the Web, but now that everything is connected to the Web, it can even be an advantage. In addition, the markup and JSON, which have been expanding their fields of activity since their appearance, are originally JavaScript notations, and can be deserialized just by eval [^ 16].
If you go from Java to JavaScript, this is probably the Web direction, but since it is being used in other areas as well, it is possible to expand it in multiple directions. I even saw (or even felt like) a library for DL. Of particular importance is the presence of Electron. The client side of JavaScript (or maybe it's better to just put it in a "GUI application") is currently Electron (especially for PCs). The existence of "big guys" like VS Code and Discord doesn't hurt you, even if it helps.
However, JavaScript has a big problem in execution speed. No matter what you do, it's slow. Conversely, if you solve the speed problem by some means (such as serverless architecture on the Web), you can use it as much as a lead ball, if not a silver bullet.
Q. Isn't it better to throw away Java? A. You should throw it away. But that's not new, and you should be prepared to throw it away at great risk. However, considering the possibility that the client dislikes it, it may be about tonton. Q. What should I use instead of Java? A. There is no language that can completely replace Java, it is extremely difficult to do everything with one, and it is a high risk because it causes a situation like this. Many languages should be used for different purposes. For example, use Python for machine learning. Q. However, it is difficult to continue to support many fields. A. If you dare to think about it, C #, JavaScript, and Ruby are the most promising. But if the reason you want to focus on a single language is, for example, education costs, it's faster to keep using Java in the first place. Especially, the difference between Java and C # is small, and there is a way to use a language with low learning cost and similar grammar such as JavaScript.
[^ 1]: That is the religion. Please forgive me. [^ 2]: As you know, reality is not the case. Well, just because a single binary boots everywhere is a threat enough. [^ 3]: If this is an interpreter, it is still easy to avoid it if you mess with the interpretation procedure, but if you drop the bytecode, it will not be so. [^ 4]: Most of them are really old, so I don't think I should forgive them, but when I actually use them, I want to hit them without playing with Mashiyama. It's unreasonable. [^ 5]: The best example would be Generics, or Erasure. Is it around char? [^ 6]: If there is, I've already switched to it, and I'm going to a place where I can work with it. [^ 7]: However, most of the recent scripting languages are JIT-optimized, so the speed difference has narrowed considerably. [^ 8]: Who uses a language that no one knows? [^ 9]: Somehow the escape doesn't work ... [^ 10]: The reality isn't (ry, though, this is indirectly achieved by extensions of .net itself, such as Mono and Xamarin, and it's probably just aligned with others in the first place. [^ 11]: David Heinemeier Hansson, in short, the author of RoR. [^ 12]: The time is unknown. [^ 13]: Well, if you think about it before and after the "disaster" of Rails, it might even be profitable. This may have been good. [^ 14]: Matz is from Tottori but lives in Matsue City, Shimane Prefecture, and has received an honorary citizenship. I'm sure I was providing support for some reason, but I wonder if I'm still doing it. [^ 15]: A modern web browser. Unless you do so on purpose, it is no exaggeration to say that the browser is a JavaScript processing system. [^ 16]: A function that evaluates, or executes, the specified code. Since Abunai, something for reading and writing JSON properly was made later.
Recommended Posts