An age ago there was a time when the solution was "meta-level", and "What was your question?" This was during the heyday of Logic Programming when it seemed that we were going to take over the world (when they woke up to it that is).
Meta-programming is extremely powerful, and it seemed that there was nothing that could not be solved using some kind of meta-level approach: compilers, debuggers, abstract interpretation, program transformation, utility programming; the list had no end.
Unfortunately there were, and are, some problems with meta-level programming. From a logic perspective a key problem was that you had to prove, again, the logical validity of the meta-level inferences that you made in your application. More pragmatically, there were issues with the 'standard' way of reflecting from logical formulae to data structures in Prolog that caused logical and practical problems.
Like most Prolog-ers, I have been somewhat amused by the apparent enthusiasm for all things meta in the Java world. It has had a distinct been-there-done-that kind of feel about it.
Recently I came across one of the down-sides of the meta-fever. Wicket uses a lot of reflection to simplify programmers' tasks. However, the down-side is that using a string to denote a method confuses most IDEs; making refactoring a tricky proposition.
Meta-programming is extremely powerful, and it seemed that there was nothing that could not be solved using some kind of meta-level approach: compilers, debuggers, abstract interpretation, program transformation, utility programming; the list had no end.
Unfortunately there were, and are, some problems with meta-level programming. From a logic perspective a key problem was that you had to prove, again, the logical validity of the meta-level inferences that you made in your application. More pragmatically, there were issues with the 'standard' way of reflecting from logical formulae to data structures in Prolog that caused logical and practical problems.
Like most Prolog-ers, I have been somewhat amused by the apparent enthusiasm for all things meta in the Java world. It has had a distinct been-there-done-that kind of feel about it.
Recently I came across one of the down-sides of the meta-fever. Wicket uses a lot of reflection to simplify programmers' tasks. However, the down-side is that using a string to denote a method confuses most IDEs; making refactoring a tricky proposition.