TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Mime-Version: 1.0
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: Rakesh Malhotra <[log in to unmask]>
Date: Wed, 22 Jul 1998 15:03:33 -0700
Content-type: text/plain; charset=us-ascii
Reply-To: Rakesh Malhotra <[log in to unmask]>
Parts/Attachments: 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++.