Unofficial view Java vs. NET
The author of this article: Sen Wang
Institute of Science and Technology Management, Taiwan Jiaotong University
moli.mt88g@nctu.edu.tw
Objective:
In the last six months of lecturer career, encountered a lot of students from VB to Java, most of the engineers or new software development in the field of friends will ask: "I should learn. NET or Java?" "Should I learn C # or Java?" Related topics in the network can be described as Anchao surging, at any time may wipe the gun fire, in the publication of this article, the C # Spec in depth to read, and also roughly studied. NET related technical articles so think about this published a experience, there is no preset position, please include a lot. I also thank Mr. Michael Hung for allowing this article to be published in a Java weekly report.
This article applies to the object:
"This article only applies to general engineers, special circumstances do not count!" What is a special case? In my personal case, knowing that Delphi is the original language is Object Pascal, so to use the object Pascal and Delhpi into one feeling. However, when I was developing project, I just inexplicably liked to use C + + Builder. When the "basic doctrine of the programming language" or "programming language nationalism" encountered normal behavior, how can not say. (This is what Mr. Li Ao's said, I only change the key words, I hope not to be sued by him) Another special situation is that if you think differently than the average person, this article does not apply to you.
The first thing you want to talk about is the architecture issue:
The author has not studied the structure in depth, and it is not clear what the so-called architecture of the Internet is referring to. But I can be sure with an engineer's intuition. " NET is certainly better than the Java infrastructure on the infrastructure! " Because. NET introduction than Java Late 5 years, the middle also has J + + and the development of WFC, if made a more than Java bird things, is it? As long as Sun has not been defeated by Ms after the Empire's counterattack, it has disappeared from the market and is believed to have launched a comparable number of years later. NET good things, and then a few years later, MS and make a better thing. In fact, the evolution of technology is the case. So who is strong and who is not strong, is purely historical inevitable result. So there's nothing to argue about. In the future, who will be the market overlord, see two leading companies who compare marketing, Who is more close to the engineer. Although the information industry has used several times to repeat the history of "good things have been killed, and secondary products have occupied the market". But no one dares to assert.
Second is the question of who Chanbao:
Sun's slogan is "Network is the computer", so on the Java strategy, Sun assumes that the world is full of heterogeneous platforms, so design Java in the hope of a single Java programming language as the center, so that it can be implemented on a variety of platforms. So the JVM is going to stack The way machine is designed, because no matter who you are, you can actually make stack machine. But this is an undesirable world, and even sun itself Solaris has several patch to use the new version of the JDK. Even Borland spent more than three years trying to get JBuilder can also launch windows, Linux, Solaris, Mac OS X Four versions, so the "Write Once,run anywhere" ideal is actually difficult. Borland in addition to prove that Sun's ideals are a chance to achieve the ceremony of the Datong article, it also proves that after careful architectural design and optimization, and with the engineers accumulating a lot of experience, it is still possible to break the original sin of Stack machine, which is inherently slow (though not ideal, requires a lot of RAM to fill the ideal ). Sun makes its official tool JDK difficult to use, the Internet is always complained that it is Java Developer Killer, although the. NET Framework SDK is as difficult to use, but Microsoft has at least Visual Studio.NET if Microsoft's visual Studio.NET let engineers feel like in the Open Benz, then Forte is like a road in front of a Benz marked with a bad bus. So Sun really needs to get a lot stronger. But it's no wonder that MS is a pure software startup, and Sun is a pure hardware startup, It's normal for sun to do software but Ms.
In contrast, it assumes that there are only x86 CPUs in the world, or that it is widely said to be wintel platforms, and that there are many engineers in various languages around the world. Because this is supposed to be a strategy center, so design. NET, the CLR can make the best design for the x86 CPU, and some instructions can even reach the mapping of 1 to 1 with OP code, so the speed naturally runs fast. But it's a lot of trouble to ask him to move to SPARC or as/400. As far as the engineer's point of view is concerned, it will naturally be biased towards. NET, because a lot of choices (oh, this is debatable, later on), but in terms of the interests of 3rd party manufacturers and bosses do not want to be tied to a particular platform, the point of view, will favor Java. Everybody wants to,. NET's WinForm design is so beautiful, it is likely to accumulate a lot of good ideas after Anders left Borland, if. NET out, Borland probably really only the IDE can do. So the winner of the final profit, it is likely to decide to win or lose, so I said: "You want to believe that Jesus to believe in Jesus, to believe in Buddhism to believe in Buddhism, your heart God will lead you to his mouth of heaven." Oh, yes, if both sides have to Chanbao of course, but please be careful not to be on one of God's so-called heaven, but at the same time under the two God mouth of hell!
Again is the problem of programming model:
Memory, the last time I was surprised to feel when the Delphi came out, let me first think that the program is very beautiful, very simple things, but since that wonderful experience, has so far, there is no new ideas to people have a refreshing feeling, I always feel that the development of software has come to a bottleneck? Anders engage in VCL, Borland said it is VB Killer, Anders do. Net,ms when. NET is Java killer, how every time the Anders appears, the killer will appear? I suggest to change his enders, what do you think?
In short, the component architecture, whether it is VCL, JavaBean, WFC,. NET Framework, has been setxxx () and GetXXX () the set, progress is only a small step, not a great leap forward. Language is not supported in the past, so to make special grammar, Now get a new language to support it and standardize it. Since the Jordon retired, the NBA has become a bit less lively, but I really hope that after Anders, there is a generation of wizards to give another let us engineer relaxed programming model!!
Finally, the language problem:
C # is more complex than Java, a lot of keywords, let me feel very complex, first say the form is good, C # provides the value type and reference Type,value type is also divided into simple type, enum type, struct type, The reference type is also divided into class type, interface type, delegate type, array type. These types can use pure by value when passing parameters on the match, by reference (ref) , Ouput (out), parameter array feel really busy!! In C # We can also use the unsafe keyword for direct access to indicators. Access rights modifier In addition to the inherent public, protected, private, but also added internal, protected internal. On multiple types, In addition to the previous virtual, also added the override keyword. Oh, of course, some people will say I do not bother, but if your car has a similar Thunderbolt car can turbo function, I think anyone with curiosity would like to find a chance to try to see where his limits, no matter whether the powder body broken. The Java programming language is limited in functionality, and engineers often find other specific solutions when they encounter specific problems, so that the program is easier to maintain. But the language is complex, there are many ways of doing the same thing, the degree of freedom becomes bigger, the engineer plays well, can break through many restrictions, Realize your dreams. But what about maintenance?
You see some genius can use C simple several lines of program to write a PI value program, but how many people understand? There are some gaps between individualism and teamwork. There is a dilemma between the simplicity and complexity of language. If you have a declaration, loop, or function call to the three basic elements in your programming language, then it's OK to design a complex, powerful programming language, right? Sun can start to introduce many C + + functions in Java, but it does not, why? C # complexity, if combined with operator and template, then and C + + can be some of the spell!
Every time on the Java course there are a lot of VB programmer told me that he could not ascend up, although I would like to take most of the responsibility, but I began to doubt how to improve the VB programmer to the. NET level? I said VB Programmer of course not a few proficient in various languages, using VB is just pure fun engineers, but refers to the current Taiwan information industry, many of the backbone and Soho, of course, someone will call me to use vb.net,cobol.net, the question is, have you ever thought why C + + so powerful , but still a lot of people like to use C? Why do people start to switch to Java? Why is Pascal not mainstream, but everyone still like to use Delphi?
The marketing ad for Ms now tells all engineers a message: "Engineers of all languages can be satisfied." NET. " Believe that you have been to a friend after Microsoft or other seminars, except to find out. NET very good, very good, there are many functions of their past dream of the function, but also found that they were cheated by MS (someone told me he felt he was abandoned by Ms), because they found that the past is useless, what rice vb.net, to him to learn that VB, he would rather learn C #, In any case, C # is no less difficult than the vb.net syntax.
http://www.vbqa.com/discuss/vb.net/read.asp?id=11
In this forum, Mr. Christorng said very well: "Moreover vb.net and C # Similarity, in my opinion than vb.net and VB6 of the similarity is also high ... ^_^"
Any language, to be able to function on the CLR, must conform to the CLS specification, which means VB. NET does not have VB two words in front of it, can let in the past with VB friend still have excellent productivity. If the grammar does not expand, do you believe that the component written by vb.net can be used by C #? I mean "graceful usage", not the use of the Pang men aisle after a big circle. MS in the. NET Framework SDK Beta 2, it is said to change the VB back, although do not know how much correction, then this new generation of VB can play how much the ability of the CLR? Everybody just wait and see!
I can only make a metaphor, the same horsepower, torque and interior decoration, when carrying a girlfriend you want to use a car that looks like a BMW? Or is it long like an electronic float? Use VB to use very proficient in the case, so the engineers will find that to break the two veins, you must go to understand COM, otherwise can never break through, this in. NET is equally applicable, to play. NET's ability, finally must go to C #. So to develop the program on. NET, I absolutely choose native Language C #, do not use vb.net. Because, the car will not because he looks like a UFO, you can not walk on the wheel!
So, the same means of transportation, Taipei station to long, you will choose a plane or a taxi? So there are things that Java may do on Windows platforms, but when it's complicated and unattractive, I use it. NET. When writing GUI program I will choose VB or Delphi, at least not like JBuilder and visual.net, just a simple GUI, changed the point property, Running out of a lot of code that I don't know where to change. Every time I see these boring and repetitive code, I can't speak for long.
Conclusion:
Whether the mainland or Taiwan's engineers, there is a "broad Chinese" of the deep-rooted evil, things have not come out, can be a lot of speculation, and our TV fortune-telling half fairy no different. Besides, people really like fortune-telling! No wonder my mother told me when I read the Art of Computer programming that programmers are no different than wizards, except that they rely on tortoise shells and spells, and we rely on programming languages. We always cook rice noodles, we shout to burn, A large pile of virus-writing experts, a lot of good at cracking the master. But it is not a world-class software. Of course, this also scold me, but I really do not have any contribution to the software industry.
Unofficial views, welcome to write a discussion.
moli.mt88g@nctu.edu.tw
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.