Programming languages are not equivalent

Source: Internet
Author: User

I

"C ++ (or some other language) is the bestProgramming LanguageThese ideas are often used by new programmers. Here we talk about C ++ because it is especially easy to mislead new users. C ++ is a kind of mental poison, and victims are often poisoned. Loyal C ++ followers tend to be extremely extreme. They will launch a strong attack on those who dare to drop their faith.

The first language I came into contact with is C ++. I just wanted to hold on to this life saving tree. C ++ is so powerful that it can do anything, from the public Syntax of C, to the class, template. These are all thoroughly implemented, and there are various libraries STL, boost to various practical libraries. I had a big misunderstanding about C ++ at the time that I learned programming as long as I learned the C ++ language. But then I found out that C ++ is a language that cannot be used in the first place.

C ++ is so huge that it has no good position from the very beginning. It seems that you want to include everything to make it look like you are doing anything.

You can use it to program programs, such as CCodeThat way. You can also use an object-oriented approach, or something like template programming. The author of this language is intended to give users the right to choose. But in fact, from the perspective of syntax and code style, it is almost not the same language, which is really bad enough.

This language may be misled due to educational reasons. Many books tend to use grammar rather than practice. Yes, there are no more complex languages than the C ++ syntax. Therefore, new users are often misled to study the language itself. Until the template metaprogramming, its syntax can really make people crazy.

Some people may think that the C ++ language is complex, but you don't have to know all the details. In fact, its complexity itself is a poison. curious people always want to drink poison and quench their thirst, especially those who like me who like to dig their roots.

C ++ has dug a deep hole, waiting for a group of ignorant people to jump in.

This is a bit biased. I just want to say that there is no best programming language. It is a question that beginners like to argue when choosing a language.

 

II

"The choice of programming language is not important, and all languages are equivalent". These ideas are often true and unsincere.

Although they still feel that their favorite language has better features, they are tired of language competition and do not want to conflict with some extreme believers. This is not bad. At least the poisoning is not too deep, or they begin to reflect on the situation and they have the opportunity to extricate themselves.

Those who really hold this point of view played down the role of language, and their realm began to rise to a higher level. I just walked through this stage, and I never learned to program c ++ syntax. Learn more about the operating system and more about the data structure. Using the father of Linux, C ++ is a bad language and a group of badProgramStaff use to make the problem worse.

Fortunately, smart programmers can see this and avoid too much harm. At least free from the weird syntax to focus on the problem itself.

 

3.

So is it appropriate to select a language with many people? The bosses think so. Because their project risks are lower than those of minority languages. Programmers can easily find someone to replace in the market. This is the continuation of the Idea of "the choice of programming language is not important, and all languages are equivalent", but it is more utilitarian.

However, I have noticed that hackers often have their own unique preferences.Richard StallmanMixed use of C and lisp,LinusUse C only.

Many foreign experts are familiar with several languages. If only one language is used for programming, why do they still know so many languages?Eric RaymondIt has been said that lisp is a language worth learning whether or not it is used.

Obviously, not just a language is worth learning. It is a pity that the skill of language selection is obtained by the elites who have learned how to use multiple languages. It is difficult for me to have this kind of savvy.

 

Thu

Programming efficiency varies with different languages. However, this does not change the criteria for evaluating the language quality.

Using the underlying language (such as C) forces users to implement their ownAlgorithmAnd data structure, forcing users to understand some of the underlying operational mechanisms, so that they can duplicate a lot of wheels. This is not a waste. It is because the C language is easier to master, and C # is easier to train some coders who only work hard for Microsoft.

It seems that a proper level is needed. Too low-level languages are too tired to use, and too high-level languages make users mentally retarded. The fish and the bear's paw cannot be the same, and the C is a good level.

I used to design a course and write an embedded operating system kernel. At the beginning, the context-related code of Bootloader and process switching can only be compiled by sink, and the C language can be used later, that feeling can only be described in one sentence: "The great liberation and development of productivity! ". However, writing an assembly is not a good thing at the end. It is a deeper understanding of how machines are executed.

For the purpose of learning, programming efficiency is not a top priority. What language is worth learning?

 

V.

Programming Language determines the way of thinking. Because programmers use different programming languages, their thinking methods and written code will be greatly affected by the programming language.

Languages that cannot change programming ideas are not worth learning. C and lisp are two extremes: one is the computer architecture and the other is mathematics.

It can be said that as long as the operating system structure of yannorimann remains unchangedSource codeStill written in C, this language will still have tenacious vitality. As for mathematics, it is never outdated.

The foundation of lisp is lambda calculus, but it seems that there is nothing more than a real machine. In the early computer era, we can see that the competition between the lisp and Unix schools is better than that of the UNIX school, because lisp always pretends to be running on an imaginary machine. Emacs is the only solution. It pretends to be an operating system, elisp is its programming language, and Linux is its hardware and driver.

"Write once, run anywhere ". I used to think that Java is especially convenient and can resist virtual machines. However, after reading the lisp language, it has changed. This is the impact of language on the thinking model. In the early days, machine performance was too low. Nowadays, the dynamic nature of high-level languages brings more benefits than the performance loss caused by virtual machines.

C ++ is indeed not a good language. to make good use of it, people will be forced to continue to study the design model, which is also the influence of language on the thinking model. The factory model, the observer model, has come up with so many good things, which are valuable experience and wealth left by our predecessors. I just want to say that by forcing people to learn awkward ways of thinking to use a language well, the design of this language is definitely problematic.

In the slow reading of the code, we will understand some common usage: Small is better. The C language is powerful enough to use pointers and struct. I believe that from books, I cannot really grasp the design patterns that are used in C ++. The true unpretentious skills are learned in actual code.

"The design of a programming language should not be a heap of features, but should eliminate the weaknesses and limitations that need to depend on redundant features ". I like scheme's design theory too much. This is a great irony of the C ++ language! In C ++, I got nothing if I had been hurt by the template, but I learned from the scheme macro what is real metaprogramming. Now I know that C ++ just wants to get all the good features of other languages to itself, resulting in only obscure syntax.

I have to admit that I have never understood Oo (not xxoo, It Is Object-Oriented). I mean that a language that emphasizes oo has not changed my way of thinking, so it's really bad. In this language, the benefits of OO are encapsulated, inherited, and abstract.

After knowing the closure, it is easy to implement the closure. The module is also a good encapsulation method, and it is easy to implement the closure. After reading the implementation of the linked list in the Linux kernel, isn't it an inheritance? Since pointers can achieve complicated concepts. As for abstraction, in addition to the examples of cats, dogs, and animals inherited from textbooks, it is practically invisible. I think dynamic types are more practical abstractions. As far as I know, in the first face to the language smalltalk, oo focuses more on the communication between objects. It is a message-passing programming instead of the encapsulation inheritance and abstraction above.

I recently saw a very interesting thing, an edgame maker, made of easy language and Lua language. I'm surprised that there are things in the world that can be done easily. IDE and libraries implemented in easy language, and then Lua is used to integrate and provide programming interfaces. Use Lua's object-oriented language to make up for the shortcomings of easy language. In this example, we can learn how the language of a bonding layer achieves better practicability through modularity.

Various programming languages have their own characteristics. If you learn a new language, you should see the ideas behind it, rather than the syntax level. It is easy to learn grammar and hard to change the thinking mode.

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.