Talk:Reflective programming: Difference between revisions

Content deleted Content added
Line 56:
 
::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)
 
:::"Add more meta-information to the shared library, and a small amount of infrastructure, and reflection in the "strong" sense will appear." Sure, and add garbage collection, references, exceptions and runtime checks to the library (all of which can certainly be implemented with enough low-level grovelling) and you'll have [[C Sharp|C#]]. More or less. But that's not the point.
:::The point is that ''the C programming language'' has no support for reflection. Of course the environment is very likely to provide some form of metadata discovery if you go low-level -- it would be hard ''not'' to. (For one thing, almost any environment will allow a program to inspect its own executable, even if it has to do all the gruntwork itself.) But calling this "reflection" is missing the point entirely -- namely, that such features are only relevant to the discussion if they're part of the language proper. dlsym() cannot be called part of the language proper, not even if we constrain ourselves to the particular dialect of C as implemented by the GNU Compiler Collection.
:::If you want to call this "a weak form of reflection provided by the environment", then sure, go ahead, but calling this reflection does not change the fact that ''C'' is not a reflective language, so Behdad's statement is at best misleading, and your dismissal of native reflection as "hooks and syntax" reminds me of the old adage that "you can write FORTRAN in any language". The same is doubtlessly true for getting reflection, as long as you're willing to put in all the extra work yourself. But you're getting dangerously close to just reasserting the basics of the [[von Neumann architecture]]. [[Special:Contributions/82.95.254.249|82.95.254.249]] ([[User talk:82.95.254.249|talk]]) 01:41, 27 November 2007 (UTC)
 
== Paradigm ==