开发者

Shifting to Java [closed]

开发者 https://www.devze.com 2023-01-22 13:10 出处:网络
开发者_开发知识库 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely
开发者_开发知识库 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 12 years ago.

I'm a C/C++ developer.

I am just intrigued why some of my colleagues are shifting to java. They actually have a lot to say why Java is better than C++. This is actually more of a trivial question, but I know for sure it would be a source of enlightenment for many also for novices like me.

Knowing only C++ and a little of java, how do you think could you convince a C++ developer to shift to java? If not, why stick to c++?


There aren't any good reasons to switch to Java. C++ is better than Java for systems and/or embedded programming, and there are many better alternatives for rapid prototyping.

Now, you tagged your question MFC even though it doesn't appear in the main text. I would recommend switching from MFC to one of the more modern C++ UI frameworks, because MFC is brain-dead, non-standard, fragile and very difficult to customize.


Reasons to stick with C++:

  1. Old C++ code base difficult/too much work to port
  2. Require use of specialized 3rd party C++ libraries.
  3. Low-level (hardware device driver) required control. C is considered a better language for that.
  4. Unable to run JVM on desired target platform.

Otherwise, I would choose for java as:

  1. The language is much "cleaner" (it's not necessary to be downwards compatible with C)
  2. The use of references instead of pointers make your life easier, much less need to write 'destructors'.
  3. My experience with switching to java/eclipse is that the refactoring tools make your life much easier. (Disclaimer: I'm not quite familiar with the latest C++ IDEs).
  4. I really like the amount of ready-to-use libraries, not only inside JDK, but also on Apache, etc.


In my opinion there is no good reason to switch to JAVA, if programming is meant for academic purposes only. But if you want programming language for personal use or creating commercial application you should try out c#.NET, python or other frameworks.

0

精彩评论

暂无评论...
验证码 换一张
取 消