Talk:Reflective programming: Difference between revisions

Content deleted Content added
Line 334:
</pre>
 
Now, as far as I can see, this method isn't really an example of reflection but it is rather a language feature that allows you to reference a symbol indirectly via a variable. As such it is very similar to taking the approach in Javascript (for example) of using indexing on the global object rather than direct references, e.g. translating `<code>new Foo()`</code> to `<code>new window['Foo']()`</code>. Specific reasons I don't believe this qualifies as reflection:
 
* It doesn't allow introspection, only indirection.
Line 341:
* Given a class name, you can't get a list of its methods (other than by instantiating it, and examining the resulting object to find out its properties, which you would need to do using an *actual* reflection API, rather than this technique).
 
I'm therefore not convinced that this example belongs here. It's an interesting hack, and a useful, simple way of creating dynamic behaviour, but due to lacking facilities for introspection, I'm not convinced it's an example of *''Reflection*''. Opinions? [[User:JulesH|JulesH]] ([[User talk:JulesH|talk]]) 00:39, 22 January 2018 (UTC)