The reason why embedded selection is developed in C language

Why does embedded development choose C language?

1. From the perspective of language features:

1C language has excellent portability and can run on a variety of different architectures of hard/soft platforms

2 compact and compact, using a flexible grammar mechanism, and direct access to the hardware

Languages ​​that have direct access to the hardware are: Assembly and C language

Assembly is a low-level language, it is difficult to complete some complex functions, but the assembly is more efficient than the C language to access the hardware

So, generally, the hardware initialization work is handed to the assembly, and the more complex operation is given to the C language.

3C language has a high operating efficiency

2. The status of embedded development - development tools

3. Low-level languages ​​in high-level languages: Process-oriented vs. object-oriented

Process-oriented:

"Procedure Oriented" is a process-centric programming idea. "Process-oriented" can also be called "record-oriented" programming thinking. They do not support rich "object-oriented" features (such as inheritance, polymorphism), and they do not allow the mixing of persistent state and domain logic.

Process-oriented is to analyze the steps required to solve the problem, and then use the function to step by step to achieve these steps, use one by one in order to call it. Process-oriented is actually the most practical way of thinking, and even object-oriented methods contain process-oriented ideas.

It can be said that process-oriented is a basic method, which takes into account the actual implementation. The general process-oriented process is to improve from top to bottom, so the most important process-oriented process is a modular approach.

Object-oriented:

Object-oriented analysis breaks down the system by abstracting key problem domains. Object-oriented design is an object-oriented implementation process that provides a symbolic design system. It uses a method that is very close to real world terminology to construct the system as a "real world" object.

Object-oriented programming can be thought of as a concept in which programs contain a variety of independent and invoking objects. This is contrary to traditional thinking: traditional programming advocates treating a program as a collection of functions, or directly It is a series of instructions given to the computer. Every object in object-oriented programming should be able to accept data, process the data, and communicate it to other objects, so they can all be viewed as a small "machine," that is, an object.

The difference between process-oriented and object-oriented:

Take one person from A to B as an example. The process is to plan the route, understand the road conditions, and make a series of preparations for yourself. The object-oriented person is to get a taxi and tell the driver that I want to go to B. No need to care about other things.

Finally, C language has its own defects, such as poor reusability of the code, poor maintainability of the code, and scalability (do not change the original code when the new code is added). Why do you know why?

BREADBOARD JUMPER WIRE

Breadboard Jumper Wire,Breadboard Wires,Breadboard Cables,Breadboard Jumper Cables

Cixi Zhongyi Electronics Factory , https://www.zybreadboard.com

Posted on