Topic: Bad or bad?
Author: bs@alice.att.com (Bjarne Stroustrup)
Date: 1 Jun 94 13:36:50 GMT Raw View
horstman@sjsumcs.sjsu.edu (Cay Horstmann @ San Jose State University - Math/CS Department) writes
> Another trivia question... Is it Bad_cast or bad_cast that dynamic_cast
> throws when you cast to the wrong reference type?
> BC4 uses Bad but the new book by Stroustrup has bad in the index.
The relevant remark is the footnote on page 316:
The standards committee is still discussing naming conventions
for standard library classes. I have picked the names I consider
the most likely outcome of these discussions.
I used Bad_cast in my original design of RTTI, but follow the (current) naming
convention of the committee's library working group in D&E. They recommend all
lower case plus underscore where needed. The aim, I believe, is to have standard
classes look as much as possible like built-in types.
- Bjarne
PS I think Borland deserves credit for the courage they have shown in tracking
the emerging standard so closely, so please don't be too hard on them for the
inevitable cases where they ``get caught'' by a change from the committee.
And, yes, the committee tries quite hard to avoid incompatible changes, but it
is not always possible to avoid a change - especially in the case of a recently
adopted feature.
Author: horstman@sjsumcs.sjsu.edu (Cay Horstmann)
Date: 29 May 1994 15:49:25 GMT Raw View
Another trivia question... Is it Bad_cast or bad_cast that dynamic_cast
throws when you cast to the wrong reference type?
BC4 uses Bad but the new book by Stroustrup has bad in the index.
Cay
horstman@cs.sjsu.edu