axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: [Aldor-l] exports and constants


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Re: [Aldor-l] exports and constants
Date: Tue, 25 Jul 2006 10:16:07 +0200
User-agent: Thunderbird 1.5.0.4 (X11/20060516)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]