Content deleted Content added
Chnaging the MOO description |
|||
Line 52:
[[User:Behdad|Behdad]] 03:47, 23 September 2005 (UTC)
:That's not reflection, that's [[dynamic linking]], a form of [[late binding]]. It does allow you to do things you couldn't do statically, but it doesn't give you knowledge about the program's own structure like reflection does. You can't find out how many arguments a function takes or what procedures a library exports, for example, or dynamically create objects of a given type name, find out what members an aggregate type has, etc. If we can call this reflection at all, it's a very weak sort of reflection, and it's certainly not part of the language itself (support for dynamic linking comes from the environment; the language guarantees nothing). [[User:82.92.119.11|82.92.119.11]] 15:09, 25 November 2005 (UTC)
::Like Behdad, I fail to see the distinction beyond that dlsym() is only a slightly weak implementation of the idea: add more meta-information to the shared library, and a small amount of infrastructure, and reflection in the "strong" sense will appear. That this is all possible at such a low level suggests that, indeed, this is a property of the environment, ''not of any particular language''. That there are special hooks and syntax in language X to help it along is no more or no less than the aforementioned "infrastructure".
::Also note my use of "slightly". The fact you can dig out information about code and data structures doesn't help you much in the end, ''unless you know what you are looking for and how to use what you finally find''. Behdad's printf() example is basically identical to '''all the examples in the article'''. They search for something in some meta-database and, upon success, make immediate use of it. [[User:Mdf|mdf]] 13:10, 15 August 2007 (UTC)
== Paradigm ==
|