1. Programming Languages
1. Why did we move from punch cards to programming languages? What does that tell you about the purpose of programming languages?
Punch cards were the first “tool” to communicate with the computers. These are the pieces of stiff papers that contained data and used to feed the first IBM computers. The method of data storage in such cards was primitive - the holes and their absence represented different characters, words, commands. Each hole was punched manually by programmers. Therefore, it took months to complete basic code. Another disadvantage of such a method was its proneness to human errors. As Grace Hopper, the developer of the first compiler COBOL (Common Business-Oriented Language), said in her speech for the Association for Computing Machinery, “It was amazing how many times a 4 would turn into a delta, which was our space symbol, or into an A. Even B’s turned into 13s”. Undoubtedly, punch cards were not able to mass spread the availability of using computers. It was expensive, time-consuming, and high risk of errors. As time went by, the programmers developed much more effective approaches to eliminate problems related to punch cards. This is a primary purpose of nowadays programming languages. They are fast. They are human-readable, as the code is written in high-level languages, and automatically translated to machine code. And most importantly, nowadays programming languages make programming available for everyone who has a will.
2. There are hundreds of different programming languages out there. Why do you think we need so many?
There are many different programming languages. They seem to be very similar, but in fact, there are major differences. First and foremost, they differ in their purposes, or rather in their fields where they are mainly used. For example, the most popular and my favourite Python is perfectly suitable for ML, backend and task automation, and that’s why it is mainly applied in data science and AI. On the other hand, JavaScript programming language is suited for web development (makes websites interactive). For the third example, SQL is mainly used for databases. It’s convenient to store, search and sort data. Many programming languages serve many jobs.
3. What are some drawbacks of a programming language you use? How would you like it to be different? Think of specific examples.
Python has a lot of advantages, and is therefore beloved for its beneficial features. However, there is another side of the coin as well. Python is an interpreter translator program, which converts and executes code line by line. This is considerably time consuming, compared to compiler translator programs such as C or C++. Moreover, there are no pointers in Python, which store the memory address of another variable. This technique is helpful for working with hardwares and low-level systems, where performance and memory efficiency are critical. Including pointers in Python would allow memory manipulation manually, but it also has plenty of risks (segmentation and memory leaks, etc.) Therefore, if possible - the ability to choose managing memory by programmers or automatically by Python itself would be the major difference I would like to see.
4. If you were going to create a new programming language, how would you start? What do you need to define?
First and foremost, to create a new programming language the type of translator program needs to be determined: would it be a compiler or interpreter. Personally, I would go with an interpreter - it’s easier to debug. Another step is to define how the programming language looks and its syntax. Basically, it is how commands look in a new programming language. For example,
out : # to print the result;
Inp : # to input the values;
Then, it is necessary to break the commands to tokens - we need 4 stages of interpreter translator. Tokenization, lexical analysis, syntactic analysis, the runtime engine. Half of the job is done! The other half is to start by writing small operations and to embed more complex functions such as loops, conditional statements.