Re: type_info, vtable
Hi!
"tom_usenet " <tom_usenet@hot mail.com> wrote in message
news:3f4b45d0.4 41533437@news.e asynet.co.uk...
[color=blue]
> RTTI has neither the word dynamic nor the work static in it - it is
> the runtime bit that is important, and also the "informatio n" bit.[/color]
Would you therefore call the _static_ selection of overloaded
functions...
void Catch( int );
void Catch( void * );
.... a type of RTTI? Why, or why not? If not, what would you
call it instead?
[color=blue]
> I suppose my point is really that RTTI should be reserved for
> type_info and typeid, and that a new term should be invented for
> dynamic_cast and exception handling, such as "Runtime type
> compatibility checking", or RTCC, since neither of them involve
> information about the type, only about the compatibility of types.[/color]
Like it has been explained, the implementation details of
dynamic_cast and exception handling do not necessarily
intersect. Attempting to define a descriptive term for what
does not exist is a futile exercise.
On the other hand, if the new term is to describe the union
(rather than intersection) of the two, then things like virtual
methods where the compiler selects a method at run-time
based on the actual type of a polymorphic reference or
pointer, and even overloaded methods where the compiler
selects a method _seemingly_ at run-time based on the
static type of its argument also fall in the domain of this
new term.
Cheers!
- Risto -
Hi!
"tom_usenet " <tom_usenet@hot mail.com> wrote in message
news:3f4b45d0.4 41533437@news.e asynet.co.uk...
[color=blue]
> RTTI has neither the word dynamic nor the work static in it - it is
> the runtime bit that is important, and also the "informatio n" bit.[/color]
Would you therefore call the _static_ selection of overloaded
functions...
void Catch( int );
void Catch( void * );
.... a type of RTTI? Why, or why not? If not, what would you
call it instead?
[color=blue]
> I suppose my point is really that RTTI should be reserved for
> type_info and typeid, and that a new term should be invented for
> dynamic_cast and exception handling, such as "Runtime type
> compatibility checking", or RTCC, since neither of them involve
> information about the type, only about the compatibility of types.[/color]
Like it has been explained, the implementation details of
dynamic_cast and exception handling do not necessarily
intersect. Attempting to define a descriptive term for what
does not exist is a futile exercise.
On the other hand, if the new term is to describe the union
(rather than intersection) of the two, then things like virtual
methods where the compiler selects a method at run-time
based on the actual type of a polymorphic reference or
pointer, and even overloaded methods where the compiler
selects a method _seemingly_ at run-time based on the
static type of its argument also fall in the domain of this
new term.
Cheers!
- Risto -
Comment