[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Type safety (was: Language War (Re: "C" Manual))



Preben Randhol wrote:

> After switching from C/C++ to Ada 95 I found again the joy in
> programming. The main reason is that as soon as a program compiles and
> can be quite certain that it will work as I intended.

This is obviously a gross exaggeration. You can be reasonably sure that
an Ada95 program won't segfault, perhaps, but that it does what you
intended is quite another matter. I have yet to see a type system that
can detect, when compiling an expression like "a + b * c", that I really
meant to say "(a + b) * c", for example, or "a * b + c".

> PS: I don't want to start a flame war on which language is better, but I
> have found that a lot of C/C++ programmers have never heard about Ada 95
> and a lot of people have been interested in the language when learning
> more about it.

In my experience, a lot of C/C++ programmers know only C/C++ really
well. They often also have experience with some form of Basic or Pascal,
or perhaps an assembly language or two, and a scripting language like
Perl. Nowadays some Java experience isn't too uncommon. But that isn't
exactly a broad spectrum of languages; all procedural or
faux-object-oriented. Talk about narrow viewpoints.

Craig



Reply to: