Re:An aphorism on metaprogramming
by nickbarone on Monday November 26, 2012 @01:05AM
(#4830834)
+1 for awesome, I really like the added line
...but, AFAIK, a Koan tries to thwart understanding in order to communicate an otherwise impossible to describe concept. By preventing understanding yet asking for investigation, a koan communicates its actual content through your investigation, rather than the successful translation of the words into your thoughts.
Yes, that's more or less how I think of koans too. (There's also the fact that in the tradition that originated them, koans were given in the context of a personal relationship between teacher and student. We missed that when we turned them into intellectual gimmicks.)
But the point is that this metaprogramming business is not impossible to describe.
Metaprogramming involves three things: the code as text, the code as program, and the code as data.
The text (often called the source code) is what programmers read and write. The program is what the code does. The data is how the code is represented to other programs.
A good language for metaprogramming requires two things: the program must be easily expressible as data, and the text must clearly evoke both the program and the data in the mind of the coder.