But perhaps "has" is not so weak. What other applications of
reflection are there other then conditional ones?

Yes "has" is quite weak. One has to give the type you are trying to test on the right hand side of "has". But if you don't know that might be difficult. In particular for an interpreter or debugger the "has" is not overly useful.

One can write out the name of a domain by using the Trace package.

#include "aldor"
#include "aldorio"

main(): () == {
    stdout << name(Integer)$Trace << newline;
    stdout << name(String)$Trace << newline;
    stdout << name(List String)$Trace << newline;
    stdout << name(List List String)$Trace << newline;

    stdout << shortName(Integer)$Trace << newline;
    stdout << shortName(String)$Trace << newline;
    stdout << shortName(List String)$Trace << newline;
    stdout << shortName(List List String)$Trace << newline;
}
main();

>aldor -grun -laldor aaa.as
AldorInteger
String
List(String)
List(List(String))
AldorInteger
String
List(*)
List(*)

But that is all I know.

Ralf


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to