in reply to Re^4: Runtime introspection: What good is it?
in thread Runtime introspection: What good is it?
The moment you have some sort of run-time parsing (required for my third requirement), I would argue that you have run-time introspection. You might not be introspecting the language you are written in, but you are introspecting the language you are parsing. So, yes, your example does run-time introspection over the language of hex numbers. In that sense, string eval is a basis for all forms of run-time introspection in those languages that provide one.
But, I think that's a bit of an easy way out. The question here is the ability to make decisions based on the qualities and attributes of the run-time environment. That's always going to be a set of data structures (in Perl, it's the symbol table). So, you can always view run-time introspection as data-driven programming. The big key, imho, is whether or not the language natively provides facilities for that (such as Perl and Ruby) or forces you to write a DSL that does (like C or Haskell).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Runtime introspection: What good is it?
by BrowserUk (Patriarch) on Jul 08, 2008 at 02:58 UTC | |
by dragonchild (Archbishop) on Jul 08, 2008 at 13:39 UTC |