The problem of comparison selection in 30 programming languages

Source: Internet
Author: User

Http://blog.csdn.net/ljy1988123/article/details/7782700 the programming languages covered in this article: C, C + +, Java, C #, Prolog, VB, Scala, Clojure, Haskell, Ada, Python, Ruby, Pascal (Delphi), Fortran, Lisp, Matlab, Perl, Erlang, Boo, TCL, Bash, C Shell, Objective-c, PHP, PL-SQL, Transact-SQL, ASP, JSP, Lua, Smalltalk, R, D

Tools involved: sed, awk, grep

We now learn a language, most of it is to use the learning (basically the Chinese companies with what we learn), based on a few interests.

For example, the big head is definitely C + + and Java, because this is the easiest bread where to eat. Recently more play with Erlang, and a lot of companies follow the Erlang, let this silence for a long time the language suddenly be stars.

Large companies generally in addition to C + +, will recruit Java, in fact, internet companies, Java accounted for half (of course, not selected Java architecture, there are many. NET family). So the vast majority of Chinese programs that live on the poverty line have very few people going to see things like Scala. However, as glue, Python, Perl still have a certain amount of user.

It seems that there are only a few languages in our lives ...

It seems that there is a problem, what language should we choose? Although each language is essentially Turing-complete, what can be written in Prolog, if written in another language, will be extremely painful. This is why different languages exist: different problems, different ways of thinking (programming paradigm).

    • Problem solving case: A large number of facts are known, and the constraints between facts require mining relationships.
Decisive use PrologFamily language.

For example, Hanoi, map coloring, Sudoku problems, the eight queens question, and so on, this test IQ, and need to find patterns from known rules problems. Have a large number of known cases of applications (e.g. most AI cases)

    • Application case: Small to very large applications, non-full Internet applications

This is what most software companies are experiencing. There are generally several solutions that are not able to compete:C++,JAVA,C#,VB. Of course, this can have a different derivation of the CLR and the JVM. In theory, for example, you can also use Scala instead (although it is not expected that big companies will take the risk). Or in theory, you can do it with functional programming Clojure and Haskell (no one would be that stupid). It is also theoretically possible to use the Ada as a powerful universal language, but it is estimated that no one is willing to accept programming languages that are more complex than C + +. Theoretically (basically only in theory), do not abandon words Smalltalk also line. Or in theory, Python, Ruby and so on with a certain graphical interface library can also be competent (but the project is large to a certain extent, you will cry without tears).

But I'm on a different line. There is a language:D language . I personally do not think that the list of preferences should be included. But it seems that the popularity does not ah .... Enterprise Support less ah ..... It's really a good language. C + + is too cumbersome and requires a language that makes C + + a pure C + +.

A little bit smaller, unable to accept object-oriented programmers, there are a lot of C. Although OOP programmers look at them as uncivilized people, they have their philosophy (I have developed from embedded, quite a long time to get rid of C, the total instinct to repel OOP)

    • Problem Solving Case: Program size is not a big problem of partial mathematics

Once a lot of people used Pascal(including the extended Delphi), many people used Fortran, but are obviously backward. Large general-purpose languages (c + +, Java, C #) demonstrate their adaptability in a variety of environments. The Lisp series also shows an old charm on some issues. (But this language is far from the magic that the authors of hackers and painters describe to us, personally.) However, my C + + style is dominated and may not be able to fairly evaluate lisp, but according to my experience with Lisp, in most cases, I finally gave it up. Because in most cases I can always find a better reason to use C + + (or other OOP language)

In addition, the general study of the research has used matlab. This tool, two words: powerful! But it only refers to scientific calculations. Out of this aspect, you have to consider the fit, after all, fixed matrix thinking is not what the situation is effective. The most I use MATLAB is neural network, image and signal processing. It is no exaggeration to say that Matlab berthelot off a photoshop ah ... (Of course, you'll have to use ...) But Matlab neural network does not do, do too bad, small-scale network can, 3 layer without BP f net, dozens of hang off. There is the need to use Ann Bar. (or C + +, laughter)

    • Special application case: Applications that require a lot of string handling

The preferred tool is Perl, but if you get used to sed, awk, grep and can do the same thing easily, Perl is absorbed by three directors.

Next is C + +, don't shoot me. Have you ever used a regex? That's the one in boost, which was recently incorporated into C++11. With the regular expression of C + +, processing characters, invincible a lot of wow. Of course, Java programmers do not shoot me, I know this library a large common language will have. I mention C + +, usually with no denying that Java and C # can do the same thing at a similar cost.

    • Special application case: Need a glue to bond the program written in different languages

Preferred is python. Two words: Lean (yes, so a strong language is a little too frivolous, but it's really simple compared to ruby ...) (In addition Boo in. NET can be used to replace Python)

Followed by Ruby. Two words: Complex

After all, there is no rails,ruby at all to fire up. It turns out that Python's philosophy is right. Of course, the two languages have a lot of different details, even in the programming paradigm of different (really want to be unclear white Ruby support multiple paradigms How can be a merit? The market proves the sheer of Python)

    • Special applications Case: Automated Testing
Don't ask, it must be. TclThe As a result of this special application, so the individual users are basically not used, most of the embedded company. Huawei, digital pass, Maples and Calder, etc...

    • Special application case: System Bottom

This must be C . Operating system, driver, the underlying software, most of which are written in C, call the API, if not Microsoft's ActiveX technology, still have to honestly use the C API.

    • Special application Case: System Management
This system management, generally refers to the Linux. Preferred is definitely a variety of Shell: Bash, C Shell
    • Special case: Apple platform
We have no choice .... objective-c
    • Special field: Embedded
Most of them are C. But the Andriod platform and the Apple platform have to be obedient. Gmszone netizens suggest Ada also put here, I do not deny Ada in the embedded field of the broad future and real strength. But c dominated the embedded so long, programmers basically have no way to accept other thinking. For example arm, I used the XScale three years ago, I really do not want to imagine giving up C. Embedded in the right and wrong sometimes there is no way to say, so it is important that experience, the accumulation of predecessors, so like a monopoly, not revolutionary excellent at all can not shake the foundation. I used Spartan's FPGA, and I remember that the core I chose was also programmed with C programming interface. So, I'm sorry I can't accept the opinion of the netizen here.
    • Special applications: Web pages
embedded in the Web page, the hottest thing is definitely PHP(back end) and JavaScript(front end). The former replaces the old CGI. However, the Java Department's JSPEmbedded java,asp embedded in C #, are powerful opponents of PHP. Common language is aggressive in every way.
    • Special applications: Database
is more than which SQL version is received. Standard SQL Naturally needless to say, according to rankings, PL (SQL)/transact-sqlList.
    • Special applications: Parallel, distributed
Parallelism is becoming more and more important. Preferred Erlang。 However, based on the existing conditions, it is also considered to choose the common language of parallel optimization. C + +, Java, C #We have done a lot of good work in this area.
    • Special applications: language-specific enhancements
No need to ask, what I'm trying to say is Lua。 Written in C + +, using Lua to write logic is a classic development strategy for many games. (Of course, like Unity uses its own javascript,unreal.) It is an interesting practice to learn to accelerate with Lua on the basis of general-purpose large languages.
    • Special applications: Artificial Intelligence
On artificial Intelligence, PrologAnd Lispis the darling. RLanguages are sometimes used for data mining (but too slow)

The problem of comparison selection in 30 programming languages

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.