Is C really a "Basic Language?

Source: Internet
Author: User

Almost all Chinese universities teach C or C ++ language in computer science, and serve as a basic program language course. But from my perspective, it seems that the C language is not suitable for beginners. I think the C language is not "Basic ".

The most important thing is that in C language, you must write a complete program and make sure it is correct. This is different from some explain execution languages. For example, in Python, every time you write a statement, the computer will immediately respond. For C language, in order to write the first program, at least you need to know the # include, main and other things. Obviously, they are not a single sentence for beginners to explain clearly.

In depth, the C language should be relatively complex. Pointers in C often cause errors, which are not so obvious. So far, Java does not have the "Pointer" concept at all-this is one of the reasons why Java says it is simpler than C. In most C language textbooks, pointers are explained as a key point.

Some Rules of C language may also limit the creativity of learners. For example, in C, an array is a continuous memory space. When the array is declared, it cannot be pointed out with a variable. In the past, a friend of mine said why int n = 3, int A [n]; Compilation fails. That's what I explained. However, the fact is that this is only a feature of the C language. Logically speaking, the two lines of code of a friend are completely correct without any ambiguity. But it is wrong in C. If you look at Java, PHP and other languages, this method is completely correct.

C programming often involves a lot of trivial details, making it difficult to concentrate on solving "real problems ".

As for C ++, I think it is not appropriate. Even Mr. stroustrup admitted that C ++ is one of the most difficult programming languages to learn. What else can I say? Therefore, the teaching of C ++ is mostly just like that of C.

In the previous issue "programmers", there was a topic about "Dynamic Language. It is represented by MIT. Some American universities use the scheme language or Python. I personally think python is a better choice, because it allows beginners to develop the habit of "Writing beautiful code. I think this is the best habit for beginners.

To get started with C language, I think the advantage is that the syntax of the current mainstream language is similar to that of C language, and the keywords are similar. However, syntax and keywords are only a very small part of programming. Of course, because the C language is very complex, it will also encourage students to learn some knowledge about the underlying principles of the Computer-but the cost is a little too high. Is it true that some of them put the cart before the horse?

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.