Ada, an especially good programming language

Ad: Order programming in Ada or other programming language.

All programming languages belong to either of two groups:

1. with “static” (or “strong”) types;

2. with “dynamic” (or “weak”) types.

Both groups of languages have their advantages and disadvantages. The main thesis of this article: “Ada is the best of statically typed languages.”

Advantages of languages with static types (and so automatically advantages of Ada, because Ada is a statically typed language):

1. greater speed of program execution in many (sometimes hundreds) times (by the way, the consumption of electricity for useless heating of the CPU decreases as many times);

2. possibility (completely attained in Ada) of more reliable control against “stupic” errors, like confused number and string variable (a sequence of symbols).

Ada, in some sense, is the language with “the most strong” types among languages with strong types. Thus automatically follows:

1. Ada one of the fastest programming languages among all programming languages. The program can really work hundred times faster than in a dynamic language.

2. Ada completely rejects “stupid” errors with confused data types. I will say more about this below.

Ada history

The story of appearance of Ada is worth separate discussion.

Pentagon (so the American defense ministry is called, because they reside in a pentagonal-shape building) proclaimed a competition for creation of a programming language for solving military tasks. The language should have provide high reliability of the programs, make possible to develop big complicated systems, be high-speed and “readable” for programmers (even if the text of the program was written by another programmer), and also support effective use of multiprocessor systems (which recently became widely available in the form of multicore CPUs; note how the developers saw into the future!)

In the competition the programming language “Ada” (called after a woman mathematician of 19 century Ada Lovelace). By 1983 it was written so called formal specification of Ada, which became known as Ada83.

Ada83 didn’t fit the requirements for a modern programming language. So at its basis were created Ada95 (year 1995) which can be called a modern programming language, and later Ada2005 and Ada2012 (guess which years).

Ada became wide spread in areas requiring increased reliability (military industry, finances, infrastructure control, etc.), for example the F-16 plane was have been made with Ada.

A list of Ada advantages

The list of main Ada advantages:

1. Ada is one of the fastest programming languages. The program can really work 100 times faster.

2. Ada completely rejects “stupid” errors with confused data types.

3. Good support for control event against less rude errors. (This provides four times less errors in Ada programs). I will tell more about this later.

4. Modular structure of the language. Support of big and complicated programs.

5. Very good support of modern multicore CPUs as well as supercomputers with more than one CPU.

6. “Powerful” modern programming language: object-oriented programming, templates, flexible control of allocating dynamic memory, etc. (Don’t worry if you don’t understands the terms; this simply means that Ada is a powerful modern language.)

7. Rather quick compilation (the programmer waits less when Ada creates an .exe file and has more free time for programming and searching for errors).

8. Support for all kinds of devices: computers, embedded electronics, space ships, etc.

9. The language is such that it’s convenient not only to write but also to read (if you are a programmer).

10. There is a free but good development environment (programs for programmers).

11. There is an international standard.

12. Decimal fractions allow to work, for example, with financial information.

Reliability of speed?

Between the requirements of reliability and speed there is a natural conflict:

For a program to work with maximal possible speed, it is necessary to deny control of correctness of the program during its execution.

For example there is a list of 10 numbers. If the program attempts to change the 12th number in this list, it is a nonsense. If the control was not done, this program will write our 12th number, saying in technical terminology, “haphazardly” and the program may even destroy itself and start to do something meaningless.

Thus, for ensuring reliability the program must do control against such nonsensical operations. But control requires CPU time.

The Ada resolution of this contradiction is the following: There are two modes of work: with or without control (well, there are more modes because it’s possible selectively turn on some kinds of checks and some leave off). With checks the program may work a few times slower, but with checks it happens more seldom that the program starts to do completely meaningless operations.

Often the checks are left on during initial debugging (search and fixing of the errors) of the program and turn off when the program is ready, in order to increase the speed and decrease the electricity consumption spent for heating the CPU. If you order from me Ada programming, we can decide if I leave the checks on after I deliver you the ready software.

By the way, Ada is ready to check not only the most prominent nonsense (like 12th element in a list of 10 numbers or divide by zero) but also less rude errors. A unique system of “strong” types in Ada is able to check automatically for example if a month is always in range 1..12 (not 14th month for example). Such checks allow to make the program much more reliable than programs in other programming languages. The recent versions of Ada moreover allow the programmer to do any kinds of checks at all, which he wishes to do.

Ada myths

Myth 1: Ada is an “ancient” programming language

In reality, this myth is true only for the first version of Ada, Ada83, developed in 1983.

But the latest version of Ada specification, Ada2012 is quite recent and modern programming language with such modern features as object oriented programming and template types.

I would say even that Ada is “more modern” language than other modern programming languages.

Myth 2: Ada is only for big systems

Yes, Ada was developed primarily for big systems, such as complicated defense projects of the Pentagon.

But these “big” features are useful also for less complicated systems. They make programming in general more convenient and more reliable even for not so big programs. They decrease the time spent in debugging (search for errors) and thus decrease the overall development time. This means that I do the same work for less time.

Myth 3: Ada? It’s for electronics

Really, Ada is a good programming language for “embedded” systems (electronics), but it is equally good for commodity personal computers. It is just universal.

Myth 4: Ada requires expensive technologies

In reality, there is a free Ada compiler (GNAT) for most of modern operating systems. It comes with all software for a professional programmer.

I work primarily with Linux. And yes, there is GNAT for Linux.

Disadvantages of Ada

Probably it would be unfair to tell just about advantages and not to mention the disadvantages.

Ada has the following disadvantages:

1. Ada is a powerful professional instrument, and thus to use it skillfully a qualified expert (like me!) is necessary.

2. Sadly Ada hasn’t become a popular language. As a consequence, “components” (ready to use program fragments) for many kinds of tasks are missing. For example, there is no really good components for development of Web sites in Ada.

3. An Ada program may be somehow longer than on other programming languages; so what fits in one text page for example in Python (by the way, I also do Python programming) may not fit in one page for Ada.

4. There are also more disadvantages (of which I won’t tell in detail, because such conversation requires special terminology), but they may look advantages on the background of disadvantages of other programming langauges.

Advertisement

Victor Porton does development of any kinds of software (especially for Linux), including development in Ada. Prices are moderate.

In reality, I am ready to develop software in Ada at the same price than software in more common (and less reliable) programming languages. It is a unique proposition for your.

All software projects should be done using higher reliability technologies, not only control of Pentagon nukes. There is no reason to use unreliable technologies when there are more reliable ones.

Please contact Victor Porton for development of any software project. We will consider to do it in Ada or any other programming language.

Victor Porton does expert professional development without rude errors in the area of security and hacker attacks.

Victor Porton also does paid consultation in programming and in Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *