() Neil Jerram <n...@ossau.uklinux.net> () Mon, 28 Dec 2009 11:11:03 +0000
recasting at runtime [...] also supports writing out recast code - although perhaps at the cost of losing some formatting and comments. A good start! In my mind, the formatting and comments are part of the essence. Can you give an example of what grok-db might say? I envision grok-db not as program, but a data structure (database). As such, the compiler (and other tools) would add/update/zonk bits of knowledge in the form of: (ID GIVEN RESULT...) tuples, where GIVEN may be one of: ID ; reference LOCATION (LOCATION CONTEXT) where LOCATION is some (FILENAME FORM-NODE-ID ETC...) form; CONTEXT is (STATIC [DYNAMIC...]); and RESULT is something that the compiler can use in its transforms. Also note that grok-db is in a sense already present, in the source code of the compiler. Exactly. We want to teach the compiler to share its thoughts, and perhaps learn from the thoughts of others. If the programmer (or other tool) has insight that the compiler lacks, there is no reason to deny it access. Obviously, it goes the other way, too! thi