TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Rakesh Malhotra <[log in to unmask]>
Reply To:
Rakesh Malhotra <[log in to unmask]>
Wed, 22 Jul 1998 15:03:33 -0700
text/plain (43 lines)

In browsing some of the Team Ada archives I noticed a post (quite a while
ago) from someone who had quoted a paragraph out of Scott Myer's book
Effective C++.  The para goes something like:

"Compilers are supposed to translate C++ into an executable
format, not act as your personal safety net.  You want that kind
of safety?
Program in Ada".
I cut/paste the para and sent it to a friend to read.  He in turn landed up
forwarding it to Scott Myers who actually sent him a reply.  For those who
may be interested the reply appears below:

>> >>I received an e-mail from a colleague quoting the line and
>> >>questioning whether the statement was indeed meant as a compliment to
>> >>Rather than speculate, I thought I would send an e-mail and find out.
>>"It's meant as neither compliment nor insult.  It's actually supposed to
be a
>>joke :-)
>>As a general rule, C/C++ programmers find it pretty awful that, in Ada,
>>can't assign an integer to a floating point variable without a cast.  On
>>other hand, Ada programmers probably find it pretty awful that the result
>>the expression ? in C is 1.  As a result, whether you view my comment in
>>book as compliment or insult probably depends on your point of view.
>>Thanks for writing,

Incidentally,  there is an interesting thread on comp.lang.eiffel that is
presently running on such bugs in C++.  The thread is titled "Bug Story"
and was started by Bertrand Meyer.   During the ensuing discussions one
poster actually talked about a bug in his code regarding dividing int's by
float's causing him lots of wasted time - I don't remember the exact
problems but it was kind of interesting given the above comment in
Effective C++.