My guess is that since C appeared in the early 70s and then C++ and Ada both came out in 1983, C++ was the more logical choice since it had a familiar syntax.

06-26-2010

siavoshkc

Quote:

Originally Posted by Epy

My guess is that since C appeared in the early 70s and then C++ and Ada both came out in 1983, C++ was the more logical choice since it had a familiar syntax.

I thought so. But its not fair. People came to C# and Java but didn't tried Ada. Ada programmers claim Ada is so safe and your programs will be much safer than C/C++ executives without extra effort. It is also more standardaized.

I myself write in C#, VB/VB.Net, C++ and C but never even tried Ada (till yesteday that I tried Hello World).

[EDIT]
I also have written in QBASIC, Pascal and R statistics.

06-27-2010

MK27

Quote:

Originally Posted by siavoshkc

I thought so. But its not fair.

Not fair to whom? The people that don't use it or the people that do? :p

Anyway, according to the computer benchmarks game it is often 2-8 times slower than C++:

I would guess part of the reason is that AT&T developed C++ whereas Ada was done under a Dept. of Defence contract. Also, according to wikipedia, "Early Ada compilers struggled to implement the large, complex language, and both compile-time and run-time performance tended to be slow and tools primitive. Compiler vendors expended most of their efforts in passing the massive, language-conformance-testing, government-required "ACVC" validation suite that was required in another novel feature of the Ada language effort." So this was because of the excessive standardization imposed by the governing military board, which continued until 1997.

06-28-2010

grumpy

Quote:

Originally Posted by siavoshkc

I thought so. But its not fair.

Nothing to do with choice of programming language is "fair". A significant number of programmers - both individually and as a group - pick a language based on what they consider will maximise their chances of employment with least effort.

That often means they will go go for a language they perceive to be more "popular" language rather than for a "superior" language. Words in quotes here, as the evaluations are highly subjective.

Those who advocate Ada also do not play fair: they invariably compare Ada with (say) C++ in a manner that plays to the strengths of Ada while playing to the weaknesses of C++. Conversely, C++ programmers who do a comparison with Ada invariably play to strengths of C++ while playing to weaknesses of Ada (one reason performance benchmarks are often used - it is one area where Ada often has demonstrable weaknesses compared with C++ although, in practice, that is often because of maturity of compilers rather than an inherent characteristic of the languages). A comparison which is designed to confirm the superiority of one language over another is inherently unfair. All languages have their relative strengths and weaknesses compared with others. Ada and C++ are no different.

Quote:

Originally Posted by siavoshkc

Ada programmers claim Ada is so safe and your programs will be much safer than C/C++ executives without extra effort.

Except for the effort of learning the language, and maintaining that knowledge. Ada is a large and complex language - arguably (it depends on how you measure the size of a language) much larger than C++ - and it takes time to learn it properly. In the professional arena, that translates into productive time and cost.

As with any programming language, features of Ada can be abused. Ada makes it harder to do things unsafely but a sufficiently unskilled programmer can do things in very unsafe manners in Ada.

The safety in Ada also comes with both compile-time and run-time costs (eg checks to avoid overflows). That is seen in performance overheads. If hardware resources are limited - and they invariably are in a lot embedded systems that host Ada software - more effort by the programmer is needed to optimise the code for performance.

An advantage of Ada are that it standardises features that are only envisaged in other languages.

Quote:

Originally Posted by siavoshkc

It is also more standardaized.

By what measure? C and C++ are both described by internationally recognised standards. So is Ada.

C# and Java are not standardised in the sense that Ada, C, and C++ are. But they are specified.

06-29-2010

phantomotap

O_o

I've programmed a lot in Ada. It is a nice language. I loved a lot of the features. (I miss the compilation model and user defined operators the most.) I miss them when programming in C++. (;_;)

I hate C++. The syntax is awful; it is expressive but strangely limited.

But. At the end of the day, Ada wasn't as good a "fit" as C++ for my needs. (I can't enjoy programming without generics, deterministic creation and destruction, and at least a few core provisions for "OOP". I use C++ almost exclusively.) I image that most experienced people, who have a choice, use the language they use for the same reason.