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

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



Craig Dickson <crdic@yahoo.com> wrote on 02/01/2002 (18:12) :
> 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".

Well if you write "a + b * c" then you must intend to do just that. It
is common knowledge that a computer will do what you tell it to do not
what you was thinking of. I didn't mean to say that it removes logical
errors you may make in your programming. But it will remove most errors
that you do with pointers and automatic typecasting that other languages
has.

Preben
-- 
 ()   Join the worldwide campaign to protect fundamental human rights.
'||}
{||'                                           http://www.amnesty.org/



Reply to: