Motivation for New
There are many computer languages out there and takes a lifetime to learn them all. The languages with the strongest position in software industry are C++, Java and Python. In the past some computer languages have been loved then hated then loved again. For developers is very difficult to switch from a computer language to another. Every new computer language promises to correct previous issues from other languages. Some languages may have new paradigm that may be even harder to grasp.
I have started programming with FORTRAN then I have learned in this order: Lisp, Basic then Pascal. These are all the languages I have learned in school. After graduation I have learned by myself other computer language: Ada and then C. But my first useful program was based on: FoxPro, That was a 4’th generation programming language.
Using FoxPro I was able to do alone full projects for Engineering and Accounting. The question is why I was not successful using other languages? It is because of the missing features. Other languages do not had the functionality required to create a complex large project.
Learning Pascal was a blast! This language was the most revolutionary and comprehensive language I have ever learned. I was not speaking English before learning Pascal. Learning every other language was a pain, especially Lisp. Pascal language was so comprehensive that I was able to learn English from it.
Delphi pretended to be RAD (Rapid Application Development) tool. And yes if you know Delphi you can create fast a small application prototype with user interface, menu and tool-bar. Delphi try hard to be RAD for mobile and therefore Delphi upgrades are very frequent so I have lost interest. This is because Delphi upgrades are not free while other web technologies are free. I have a Delphi license but I’m not using it.
Python language has gain a lot of popularity lately. It is a dynamic language so is a little bit slow (100 times slower then Fortran). The programmer productivity is high. This is due to multi-paradigm approach. Also the fact that is an interpreter helps. The new Python strong points are relevant in computer industry. Swift, Go and Julia are new languages inspired from Python.
Computer languages are used by millions of programmers all over the world hours after hours day by day. Developers strive to create distant learning, artificial intelligence, knowledge databases and many other incredible things using very primitive computer languages. Here are some design issues we encounter in current languages.
- All languages have comments. It is difficult to establish a good convention for comments. Ada is using — , C is using // and /*…*/, Shell is using # and ; other languages are using `.
- Single line comments in Assembler use “;” Pascal and OCaml uses (* … *) for block comments. However the (*) is an operator in OCaml. Is also start of the a comment !? So is a trap !!
- Computer languages are so many today that need to be classified in categories like: GPL = General programming language , DSL= Domain specific language OR Compiled vs Interpreted OR curly bracket versus non curly bracket languages. Here comes also the markup languages that are actually not programming languages but data structure formats: XML, HTML, JSON
- Concurrent functional programming languages like Erlang have introduced advanced concepts to make parallel computation effective. However pure functional languages have limitations in performance and are introducing concepts difficult to comprehend. Migration from imperative language to functional programming is very difficult.
- For pascal here is a link to most famous article published by Brian W. Kernighan, April 2, 1981 AT&T Bell Laboratories, Murray Hill, New Jersey:Why Pascal is Not My Favorite Programming Language . This article convinced me to start learning C, but later on I have discover C has problems of it’s own.
C and C++
- C language is not safe and is hard to read. Developers can do lots of mistakes that can even crash the operating system. Therefore C is not accepted in many companies as primary programming language. Also evolution of C is slow because of compatibility with older versions of the language.
- Why C and C++ are Awful Programming Languages
- In C you can use single = into a decision statement by mistake instead of ==. Many developers fall into this trap. Even if you want this to happen in your application, someone else can think is a mistake when read your program.
- The C++ language uses angular brackets <….> for templates. Also uses >> symbols for streams. What if you put them together? <…>> . This is a syntax error is it? This kind of syntax error can happen wit a pointer used into expressions. Consider *ptr a pointer content. What is this expression doing then? x = 1**ptr. Is a multiplication or a pointer dereferenced two times ?
- In Python and C developers use underscore to declare private variables: ___private___ notation. This is very ugly since _private_ is also used. How many underscores I have used here? I think is a bad practice to start or end any variable with underscore. I think underscore is not natural at all and is just tolerated in computer science.
- Python has mandatory indentation at a number of spaces. This is nice, but I really miss the closing “end” statement for the blocks. Therefore we will introduce mandatory indentation but also will keep the end of a block statement.
- Python do not have “;” at end of line. This seams like a nice advantage for an interpreted language. However this create some problems for a compiler. Also when we have a longer line there is need of a “continuation” operator.
- Not declaring variable types is bad for readability and efficiency of the program. I like to know what kind of variable I deal with. So I prefer a strong type system to a dynamic one. Therefore a I like to have Python language with stronger types.
- Java has object oriented style but also has native types. Therefore is a hybrid language and is not pure object oriented. Some pure object oriented languages exists and are better then Java in this regard. However Java may be more efficient due to this design.
- In Java, “=” symbol is used for assignment. “==” is used for comparison. However “==” is not able to compare 2 Strings properly! This is confusing and a trap for developers that come to java from other languages. For example if you have a=”one” b=”one” in Java a==b is true or false. This is because strings are objects and comparison will compare references to objects not the values.
- In Java, symbol + can be used to concatenate strings. Therefore “1” + “2” = “12”. This does not looks natural. In VBScript two strings can be concatenated using &, but this symbol is used for address referencing in C. In PL/SQL the double pipe || is used to concatenate two strings. So for Level language we can chosen & to concatenate two strings. It seams nice and is used in other languages like ADA, VBScript and others.
- In Java the || is used for OR the && for AND. Symbol & is for bit operations in Java. A total confusion if you come to java from other language like C.
- Ada is a nice language, however not very popular and a little bit heavy on syntax. Maybe a little bit ahead of it’s time has many valuable features.
- Ada uses two files for one program unit. Specification and the body. This can be an issue if you rename the package you need to rename the specification.
- Ada end a section of block using end <section_name>. This is inconvenient if we rename the section.