Programming Language (I)

Source: Internet
Author: User

Add a title (1) because there may be (2), maybe.

It may be hard for programmers to understand because of the programming language (programming ).Language) caused by the war (LinusTorvalds shelling C ++ is a bad language; PaulGrahamI think that companies using Java are not afraid). To put it bluntly, there are two people who have politics and two programmers who have debate about programming languages. Here, I really want to express my personal opinions. subjective opinions are not completely linked to objective facts. Therefore, I have some opinions that can be exchanged, so do not argue ......

 

C: I think the C language is well designed. The abstraction of machines is just right, and there is no additional part. C is very suitable for designing the operating system, KenThompson and LinusTorvalds has proved this. However, C is used by most (Chinese) schools as the entry language for new programmers. I think it is very inappropriate. In general, can a newbie who knows nothing about computers successfully accept the pointer concept? My opinion is the same as MIT's previous practice. scheme is a perfect choice. I think this language is very useful for beginners to focus on programming to solve problems, instead of adding a semicolon to each statement. However, MIT recently handed over the training task to Python, at least better than C.

 

C ++: although it is powerful enough, it is difficult to make good use of it. Most people (except ScottMeyers) No comments ...... I have written many c ++ codes. Although references and variables defined anywhere (I don't need to be defined outside the loop) do bring me a lot of convenience, but I think STL gives me more convenience (a big brother thinks that C ++ is so popular because he can use // to annotate it. I can be different from him ). The larger the mechanism, the more opportunities for errors. For example

C=A+B;

If you see this sentence in the C language, I am very aware of it. If there is an error here, it is nothing more than overflow or the type is not correct. What if it is C ++? Considerations may include:

1. Are A and B custom types or built-in types?

2. If it is a custom type, is the overloaded + correctly defined? Will it throw an exception?

3. What is C?

4. Is the copy assignment function correctly defined? Will it throw an exception?

5. Is there any implicit type conversion?

Vi. Wait

Of course, ScottMeyersI will use two books to tell you that many c ++ experts in the world will properly handle these problems. What I want to say is, will it not distract programmers from solving these problems? Is C ++ significantly more abstract than C in terms of improving programmer efficiency?

 

Java: the so-called Treasure trend, my understanding of the Java super big tree is-almost zero. Yes, I have never (actively) Written a line of code in Java. The main reason is that I don't know it at all. The secondary reason is that I don't plan to do it at all. The main reason why I don't plan is that I use Java to write a helloWorld needs to write so much code:

public class Hello {    public static void main(String[] args) {        System.out.println("Hello, world!");    }}

 

If I want to create a class for anything I want to do, it's really amazing. Another reason is that Java is not very interesting to me and is not attractive. But for this popular language, JoelSpolsky and PaulGraham has a much more acute view. If there is (2) in this article, I don't mind talking about this big tree that I don't understand, because it is big enough.

 

Python: it is now recognized that the programmer's time is much more valuable than the CPU time. I don't think most of today's applications are demanding program efficiency. In this case, people should pay more attention to the impact of programming languages on the efficiency of programmers, rather than the CPU. Without a doubt, I think using python can greatly improve my efficiency. In most cases, I don't care whether the running time is 0.001 milliseconds or 0.1 seconds. Python also has the advantages of not having to do anything to create a class, not even the main, and as long as I want, variable A can be equal to 100 first and then "foobar ". I feel relaxed and fun when programming in Python ~

 

Scheme: I don't think scheme has any obvious disadvantages, but PaulGraham described it as "elegant but dull ". Elegance? Dull? I do admit that I didn't see such elegant code before accessing scheme, but a person may feel that scheme is dull only when his mind is flexible to a certain extent. I haven't reached that level yet, this may be a pity. The code I see in "construction and interpretation of computer programs" gives me a sense of "shock". There is such a small kernel and such a clean code, there are languages with such a high level of abstraction, and functions with such a strong combination ability ...... I always think that if a programmer has spent all his life in imperative language (imperative)Programming) in the world, every day for the state of variables and tangle, but do not know the other world of program design, it is a great pity.

 

I would like to reiterate that this article is purely personal ......

 

-- TT

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.