Java has been studied for one week.
The reason why I plan to learn Java is a project this year. This year, C ++ made a very simple distributed non-relational key-Value Store. the function is similar to dynamo, but the implementation is much simpler than it. Many modules such as fault tolerance are not added. Even so, using C ++ to develop such a thing is still not a pleasant thing. For example, in order to use the Event Driven Architecture, epoll was initially intended to be used, but epoll was too low-layer and later found the libevent, because it was a network application, naturally, I had to use network programming in Linux, and C ++ didn't support serialization. So I found protocolbuf for another half a day, therefore, the first problem with C ++ is that its standard library is too bad. This is what it looked like ten years ago. Today, there is no thread, lock, or serialization-related content. to implement this in a project, you need to find another library, this is actually a painful process, because it is not good to determine which database is the most suitable.
A more depressing problem is memory maintenance. Building a robust system requires corresponding measures for all possible errors, for example, if a failed link needs to release all its resources, you must first find them and then delete them. This is really not a simple task.
Therefore, it is not to say that C ++ cannot do this. However, if C ++ is used, the requirement is very high. First, it requires that the programming level of the entire team be good enough (in fact, such people are not easy to find ). If you have so many talented programmers like Google, C ++ is of course the first choice. However, if you cannot find so many excellent programmers, then C ++ is only counterproductive. The final program must be full of bugs. Second, it takes a lot of time to find and learn databases. No way. Who makes its standard library so obsolete.
The reason why I want to change Java is that many open-source similar systems are developed using Java or Erlang. Erlang is certainly good, but it is a little small, so I plan to try Java. After a week of study, I have two basic understandings. First, its syntax is much simpler than C ++, which means it is easier to control than C ++. Secondly, its standard library is very powerful. Therefore, using Java should shorten the development cycle of your project and reduce the number of bugs. Of course, the efficiency may be slower. However, most projects should be tolerable.
A little bit of experience. I may understand it more deeply when I study for a few more weeks.