Recently, I saw some people on the Internet put various script languages together for comparison. Script languages: PHP, Perl, Python, Ruby. My first and second reaction was: hate! I have my own preferences and have never told anyone. I like programs with good readability. Any special characters (any non numeric or alphabetic characters) in the program will affect my reading speed. This makes me think about how we should design programming languages? Is our language design progressing, retrogressing or stagnating? ( Beijing website production )
Back when I first started writing programs, about 40 years ago, the three major programming languages were FORTRAN, COBOL and later BASIC. FORTRAN (short for FORmula TRANSLATION) is used by mathematicians (my brother majoring in mathematics must learn it) and scientists. COBOL (where B stands for Business) is used for enterprise applications. BASIC is a teaching language widely used in enterprises. COBOL is hated by some people because of its lengthy syntax, but also loved by others. But it is at least easy to understand. Look at the writing of the following cycle:
- PERFORM VARYING WS-BOTTLE-NUM FROM 98 BY -1 UNTIL WS-BOTTLE-NUM < 2END-PERFORM
It's like an English sentence. Comparison with C style language (C #):
- for ( WSBOTTLENUM = ninety-eight ; WSBOTTLENUM > = 2; WSBOTTLENUM--){}
Which is more obvious? Unless you lied about your inexperience.
BASIC (Visual Basic in this case) is moderately readable in some places.
- For WSBOTTLENUM = ninety-eight To 1 Step -1Next
The step size - the number of decreases each time - is easy to understand, at least I think so. Let's look at some very simple things.
k = i / 10;
This will drive beginners crazy. What is this for? Of course, we programmers will know, but for beginners, this command operation mode will confuse them. You can compare it with COBOL language with the same function:
- divide i by 10 giving k
A little long? Yes, but a beginner can understand it. I am not advocating a return to COBOL language now. Indeed, compared with the era of punching on paper at that time, modern integrated development tools and functions like Intellisence make our programming much easier. However, I still want to say that some introductory languages should be wordy - English sentences are much easier to master than "what the # sign represents in this programming language".
Just for fun. If you want to see a variety of languages, you can visit the website 99 Bottles of Beer.
This website collects the 99 Bottles of Beer Lyrics. There are already one thousand four hundred and thirty-four Different programming languages and language variants are used to express this song.
label: Beijing website production High end website construction