Is PHP a high-level language? Why are the other languages always black?

Source: Internet
Author: User
Ps. I know that high-level languages are not necessarily "high end". But the problem is, since the high-level language, since Turing complete, why the "low end." Where do you provoke other languages?

Reply content:

N-Card and a-card are really good, but you see N-card Party and a-card party is not black to each other?
iOS and Android are really cool, but do you see that the iOS and Android parties are not black and black to each other?
In the same vein, come on, Lord, will you tell me which programming language is not black?
programming languages can be divided into two types: 1) Black 2) No one's using it.
--Ostolovsky

You
're right upstairs.
--Kaspersky
This topic endures.

XXX language is the real programmer.
The XXX Editor is the ultimate destination for programmers.
XXX language In the future is a trend, will kill XXX.

Did you see what they were talking about?

I would like to make up these xxx, in order to avoid large-scale war, or forget it.
High-level language will be black low-level language black not move hahaha, first we have to insist that PHP is the best language in the World ~

The words PHP low is really easy to start with, write fast, built-in functions, basically most people use.
No design mode, any way to write can run, low operating costs (is a space to run)

PHP is a high-level language and also a language that can be used against Java by Black Times.

In addition, PHP is written fast because there is no name for the following category .....

Before leaving the Java. Here, you see.
Javax.swing.plaf.nimbus.InternalFrameTitlePaneMaximizeButtonWindowNotFocusedState Class Reference

Link: javadevelopmentkit (JDK) 1.7.0_03: Javax.swing.plaf.nimbus.InternalFrameTitlePaneMaximizeButtonWindowNotFocusedState Class Reference Hehe, which language is not black? Even if it is good, it can not be liked by everyone. This is how Wikipedia interprets low-level languages:
Low-level language (English: Low-level programming language), in computer science, is a kind of computer programming language. This type of programming language is referred to as low-level because it cannot be further abstracted when it is in operation, and it is directly corresponding to the machine language or instruction of the CPU, so it is generally referred to as the original programming language. Even in contrast to high-level languages, this does not mean that lower-level languages are worse than higher-level languages, whereas low-level languages are run by the central processor without the need for a large number of compilation actions, so the source code compiled and operating efficiently in such programming languages is generally higher than that of high-level languages.

Low-level and advanced are just relative concepts, Java vs. C can be considered a relatively advanced programming language.
One blog post explains the difference between high and low-level languages:

In general, high-level languages and low-level languages have some features:

High-level language: High efficiency, low execution efficiency, weak control of hardware, large target code, good maintainability, good portability

Lower-level language: Low efficiency, high execution efficiency, strong controllability of hardware, small target code, poor maintainability, poor portability


We all know that the CPU is running binary instructions, all the languages written by the program will eventually be translated into binary code, but why the implementation will have many of these differences? The following is the C language for the high-level language representative, assembly language for the low-level language representative to explain.

The lower the language, the more formally close to the machine instruction, assembly language is corresponding to the machine instruction one by one. The more advanced the language, the more the number of instructions corresponding to a statement, the reason is that the high-level language of the underlying operations are abstracted and encapsulated, so that the process of writing programs more in line with human thinking habits, and greatly simplifies human labor. In other words, you write in a high-level language, you will be converted to many of the underlying operations, and most of the work is given to the machine responsible for the conversion (i.e., the compiler), so that the human being is liberated. Because the machine is used for the convenience of mankind, so the emergence of high-level language is the inevitable result of computer development.

The following highlights why low-level languages perform more efficiently:

1. Low-level languages can optimize efficiency by controlling hardware access

The lower the language month near the bottom, that is, the stronger the ability to control hardware access, the higher the efficiency of the use of hardware resources. For example, assembly language can access registers, and C cannot. Through access to hardware such as registers, we can optimize the operation of the program to the maximum, and high-level language such as C with the most is the stack of memory structure, access speed is not as natural as the register.

2. The high-level language program has redundant work and has lost efficiency.

All languages need to be translated into machine code by compilers, and no matter how smart and powerful the compilation is, redundancy is generated. The redundancy here does not mean the number of instructions, but does not have to do the necessary things. The key to generating redundancy depends on the degree of coupling between the language and the machine instructions. The greater the coupling, the simpler the compiler translation process, and the less redundancy it produces. corresponding to the assembly carcass, because the machine code one by one corresponds to, so there is basically no redundancy after translation. The high-level language is abstract and encapsulated, so the coupling between the machine instructions is low, so the entire translation process is more complex, so in the high-level language in the embodiment of the process will inevitably produce more redundancy. It is said that the C language has a 10% efficiency loss.

3. The efficiency is not high, also depends on the programmer level.

A poor programmer with sinks to write programs, there may be many useless operations, and the program master in C language, you can optimize the program to the maximum. The end result may be that the assembly program runs out of the C language program.


In short, the amount of work done is constant, the machine is done more, the people do less, at the same time, many details of the program's control also weakened. All languages are tangled around this equilibrium point. From the focus on the optimization of the efficiency of machine operation to the optimization of C#/java focus on the development efficiency. People are more convenient to operate, more efficient, the price is that the machine to deal with more things, computational efficiency is further compressed. But this compression is within the scope of the license, which is also an improvement.

That's what I think:
    • Low-level language can directly manipulate the computer hardware, and achieve some functions, (can directly operate the hardware CPU and memory) if the programmer's level is good enough, directly can write high-performance programs, but because each development program needs to reprogram the program, the amount of code is huge, so there is a package.
    • The advantage of encapsulation is that the reuse rate is high, can be strong, but the disadvantage is that the package of things in order to adapt to the computer's various environments, and reuse, have to sacrifice memory, and CPU, not concise. But the advantages outweigh the disadvantages, with the development of science and technology, computer hardware is not so valuable.
    • High-level language is also a low-level language encapsulation, packaged into a series of functions, easy for programmers to learn, and development, and unnecessary to learn something later. Because low-level languages can manipulate the hardware directly, improve the performance of the program, and most of the high-level language of the underlying language, it will not be eliminated.
Programming language commonly known as "computer language", the variety is very much, in general, can be divided into machine language, assembly language, high-level language three categories. C, Java, PHP are high-level languages.
Advanced is not equal to high end. For PHP there is a full spit slot php:a fractal of bad Design/fuzzy notepad , there's nothing to add. A bunch of idiots do nothing.
  • Related Article

    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.