Evaluation criteria of programming languages in my mind

Source: Internet
Author: User
Document directory
  • Closeness
  • Abstract capability
  • Dynamic
  • Syntax Noise
  • Conclusion

Recently, the various Daniel on Weibo began to argue about language, which caused my impulse to write hydrology. I wrote an article to talk about my opinion.

First of all, my opinion is that the objective and rational evaluation of programming languages should not be A question of whether A is better than B or A is worse than B. I think programming languages should be evaluated based on the following features:

Closeness

Compact is a feature of limited syntax and runtime mechanisms. Compact is an advantage. At this point, the most NB is Lisp. Its syntax definition is extremely simple. The following lines are all the syntax of Lisp:

S_expression = atomic_symbol \
/"(" S_expression "." s_expression ")"\
/List
List = "(" s_expression <s_expression> ")"
Atomic_symbol = letter atom_part
Atom_part = empty/letter atom_part/number atom_part
Letter = "a"/"B"/"..."/"z"
Number = "1"/"2 minutes /"..."/"9"
Empty = ""

This degree is the ultimate in syntactic closeness.

For example, in JavaScript, many people who do not know the truth think that its language features are erratic and difficult to grasp, but in fact, JavaScript Runtime is very compact, for example, in fact, function parameters, variables, function declarations, and with are all implemented through the scope chain underlying mechanism at runtime.

On the other hand, the compact nature is worse than C ++, the massive Syntax of C ++, and the nb keywords that are rarely used by any other C ++ learners.

Although some languages provide a large number of features, it is totally disastrous to add functions without ensuring the language's closeness, yes, I am talking about Ruby. This is a pure personal opinion.

Abstract capability

Abstract capabilities should be the first priority of language evolution at present. abstract methods are nothing more than functional, procedural, and object-oriented methods, so as to see the popular history of computer languages, it is not difficult to see the rule of function type => process type => object-oriented => function type regression. Lisp has always been highly appraised in academic circles, but its commercial application has been sluggish. Its weak abstract capabilities have always been an important reason.

The reason why C ++ is able to rise from the hands of C language is that C ++ keeps an eye on abstract capabilities. Java provides abstract capabilities similar to C ++, and many other functions are cut off to improve the closeness.

In recent years, with the introduction of functional programming in JavaScript, the emergence of F # and the evolution of C # language, functional regression has become a new topic. As a result, C # Is an all-powerful player. However, abstract capabilities and compact capabilities are in conflict with each other. How can C # work hard, flexible combinations of different abstract paradigms can still cause great difficulties for learners.

Dynamic

The so-called dynamic nature is the size of runtime capabilities. For programming languages, this feature is not purely comments.

Dynamic means more flexibility, which means more "magic" available for developers. Developers are naturally familiar with dynamic languages. This is a human nature.

However, any dynamic language, such as JavaScript, Python, and Ruby, has actually been unable to be used for formation development.

At the same time, flexibility means less constraints, and less constraints mean that large-scale programs are difficult to compile. So far, we have seldom heard of over 0.1 million line-level JS language projects. This phenomenon is related to the dynamic nature of JS.

On the other hand, the less dynamic C language is now the best choice for driver and OS kernel development, because it seems that the driver does not need the abstraction that looks like NB-even if you use C ++, it's just like C.

Syntax Noise

In addition to functions and design, the "appearance" is also very important. Here we should mention a syntax noise concept, such as the function in JS, which is much more noise than lambda expressions.

Arr. some (function (x) {return x <2 });

C # can be written as follows:

Arr. some (x => x <2 );

In this case, the function keyword, return keyword, and various symbols have little practical significance. This is a noise because JavaScript syntax design must be added.

Interestingly, the pursuit of "de-noise" in a language such as python has reached the extreme, and even eliminate curly braces with blank marks, which leads to a mixed reputation, people you like are especially fond of, and those you don't like are especially annoying.

Conclusion

Programming Language is a tool used by programmers every day. It is natural to discuss language. However, it is best to discuss who is more elegant and that language is meaningless, understanding the considerations of various language designs and fully understanding their advantages and disadvantages can help us to better select a language. Finally, I ended this article with the answer to my question: are you drinking water in your washbasin?

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.