Talk:Type introspection
![]() | This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||
|
Relation to other pages
[edit]This page has a nonsensical differentiation between Reflection and Type Introspection, as it grandiosely defines what is correctly pointed out below, is simply RTTI (Runtime Type Information). The ability to manipulate the values and metadata of objects at runtime has nothing to do with Reflection (changing the values associated with an object is just basic programming state change!). Reflection originated to allow inspection of RTTI - notably in Java - not modification, which is NOT A PROGRAMMING PRACTICE IN ANY OF THE SUPPOSED LANGUAGES BEING QUOTED. I strongly agree with the opinions below that there is NO NEED for this separate, poorly worded page. Reflection, Type Introspection and RTTI should just be a single page.
The redirect from Introspection_(computer_science) to this page seems inappropriate - introspection covers so much more than type introspection (what about state, for instance?). —Preceding unsigned comment added by 196.211.47.146 (talk • contribs) 09:38, July 12, 2006
This page seems to be a non-standard term for reflection. This page should probably mention this fact and/or be reverted to a stub that redirects to that page. —Preceding unsigned comment added by BenLTitzer (talk • contribs) 07:29, February 4, 2007
- For me, this page seems more similar to Run-time type information. If we consider these three pages, I think there is at least one too many.Medinoc (talk) 13:23, 20 March 2008 (UTC)
Indeed, the relationship to reflection seems worth comment, if the two articles shouldn't be simply merged. I'm not enough of a theoretician to know the right answer. Jordan Brown (talk) 00:07, 13 March 2009 (UTC)
C++
[edit]The C++ example really should not use code from the boost library. It will make for a simpler example. Chojun (talk) 19:50, 18 July 2008 (UTC)
The dynamic_cast example is a bit misleading when applied in connection with polymorphism.
Using if() with the dynamic_cast cannot distinguish between a pointer to a base or to a derived class:
Child c;
Parent *p = &c;
Both the following questions will return 'true':
if( Child * b = dynamic_cast< Child *>( p))
and
if( Parent * f = dynamic_cast< Parent *>( p))
Using typeid is more reliable, both following statements return 'true':
if( typeid( p) == typeid( Parent *))
if( typeid( *p) == typeid( Child))
while these return 'false':
if( typeid( p) == typeid( Child *))
if( typeid( *p) == typeid( Parent))
Renedominik (talk) 17:13, 6 December 2011 (UTC)
REXX and Object REXX
[edit]Shouldn't the main article also include the the programming languages REXX and Object-REXX (ooRexx), as they include the built in function "interpret?" Interpret allows an application / program to build and execute at run time its own code and data. --Bmoshier (talk) 08:39, 23 October 2012 (UTC)