Similarities and selection of programming languages

zhaozj2021-02-16  56

Similarities and selection of programming languages

2003.9 (all copyright reservations)

First, all kinds of language programming

1. Basic units are functions

The basic units of the vast majority of languages ​​are functions. The operational environment is provided to us is a function entry. The main content written by our computers is also a function. When running, we write functions in the program or directly call the function of the operating system, or call functions within the interface of the component, or call the virtual machine's function, or call other functions of the running environment.

2. The realization of algorithms within the function is not big

The real value is the algorithm for function implementation (here the functionality or business process is not calculated). Single procedures for algorithm implementation (notes for several related functions) (notes functional business processes), the difference between various languages ​​is not very large.

Second, the differences between various languages

1. The function of the operating environment is different

This doesn't have to say more. The difference between the words, the syntax is not used.

2. The organizational method of the function is different

In traditional compilation, C, Basic, Pascal, Script, etc., the function is independent and can manage management in code files or module files.

In OOP C , Java, C #, etc., functions organizations are class or components to organize management in the form of class or components.

3. Function planning and design method

The planning and design of the function in non-OOP project is completely uniform mode, depending on the actual situation.

The function planning design in the OOP project is based on the class as a basic design unit, and the class is determined after the class is determined. There are many theoretical and tools now to support design in class as basic units.

4. The accumulation of functions and reuse

Programmer, development team, software company after many years, non-OOP's function accumulates a function library, OOP function accumulates into class libraries or component libraries. The function in the non-OOP library may partly depend on the OOP's function library, and vice versa.

5. Coding, test workload of function

Regardless of the language, if there is no special runtime environment function support or class library support or component support, each function is not very different - premise is for familiar hands, such as writing a specific sort function The workload of compilation and VB is not great.

However, it is actually aimed at different languages, and the support of the operating environment is different.

Third, the consideration when selecting programming languages

1. Operating system or virtual machine selection

The API (including more and more components) of the operating system or virtual machine is very important, this is the foundation, and the most important consideration is the most important consideration.

The advantage of Linux is that the source code is open. Java's cross-platform refers to operational systems, not cross-varying machines - saying that don't know how many of the number of Java virtual machines, and their API definition is exactly the same.

2. Selection of running environment for programming languages

A programming language may have several developments and operational environment support. For an alteration, the Basic language has QBasic, VB6, VB.NET, etc. It is also very important to develop and operate the environment, it is likely to provide more functions (such as Delphi) above the operating system or virtual machine, and also specify the lexical and grammar.

Long-term vitality of the programming language running environment is also very important.

The programming language cross-platform can only be said to be the development of different operating systems, the function of the running environment guarantees, but cannot guarantee the API of the operating system - unless the API of the operating system is not called.

3. Whether the document is detailed, the source code is rich

No good document, good foundation API (or class library, component) we have not found. Source code refers to the source code for the API application. There is no rich source code, and then the foundation API (or class library, components) will not be used. In fact, some language has been developed for many years, almost all the source code for the application of API (or class library, components) can be searched, and we copy it to change.

Copying the source code for complex algorithms (including functional or business processes) - copy we can't understand, don't dare to change it for customers. 4. Whether the third-party function library, class library or component library is rich

In addition to the API of the operating system or virtual machine, how many of the written functions are available in the development, running environment API (including classes or components). We can use. But in fact, the learning, adaptation, adaptation of third-party APIs is very large, and the risk is very high, so this one does not have to pay too much attention.

5. Syntax and lexical selection

After considering the above factors, my approach is to finally consider the lexics and grammar. The reason is very simple, I am lazy. Which language is more, the words and syntax are simple, which one I use - I am talking about giving the boss to the customer. If I have a sudden interest in a language or technology, I have to learn.

I also see that people have fanatical hobbies on some kind of grammar, just like the old people exports, I think it is very admiring. Any linguistic is very hard to use, and it is very expensive.

6. Must be the language

SQL doesn't have to say more. In this era, JavaScript HTML seems to be learned.

转载请注明原文地址:https://www.9cbs.com/read-24697.html

New Post(0)