Christian, On July 28, 2006 3:21 AM you wrote: > Bill Page wrote: > > Does it really make sense that such a high level language > should care about the name that a particular programmer > assigned to one of it's objects? > > yes, there are lots of applications of reflection that do not > involve debugging. So you should typically be able to get the > names of things. >
I still see conceptual problems with "names". I can take one source code containing, say a local variable named X that compiles and runs properly, do a text substitution of X to Y (assumming that the variable Y does not aldready occur) to create an entirely new source code that compiles abd which (usually) results in exactly the same machine code. The "name" I give to the variable X (or Y) does not play any logical role in the program. It is like a comment. It is only interesting (perhaps) to someone wishing to debug the source code and who knows the (human) meaning of X. But there are other names, such as the names of functions and types from an external library that do certainly make sense to associate with the object code. > > > [ example of "self-identifying" code ] > > Actually, I do not like your code, as this does not give you > the kind of information you would like to have with a reflection > framework (e.g.: Using proper types for types and functions, > Getting parameter types), and will cause you lots of problems > -- but maybe I am too early thinking about such issues. I am not sure what you mean by "proper types" but it seems clear that it is possible in Aldor to add many different kinds of self-identifying information as exported constants. > However, besides the parsing part, the extensions and > all the other issues, if it's the way you choose, let me help > you getting it to compile and run. The following piece of code > works: > ... Thank you very much indeed for this solution! :-)) I will study it carefully and try to extend it to examples of more practical applications of reflection and self-identification. Regards, Bill Page. _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer