axiom-developer
[Top][All Lists]
Advanced

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

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


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

On 07/26/2006 07:53 AM, Christian Aistleitner wrote:

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

I do not know if you'd consider that to be reflection or not...
I'd need a generator for all the fields of a domain.
I'd need a way to determine the type of a field.
I'd need a way to generate all Domains (or functions mapping to domains) in the top-level scope.
I'd need a way instanciate a Domain completely at runtime.

Christian, I think that you should have said that reflection would be just perfect for your AldorUnit

http://www.risc.uni-linz.ac.at/software/aldor/aldorunit

Currently one has to add a few shell scripts in order to make working with AldorUnit convenient. It would be just perfect if (at least for AldorUnit) it is possible to say

MyTestDomain: TestCaseType with {
  testMult1: () -> ();
  testMult2: () -> ();
  ...
} == add { ... }

and AldorUnit could provide a function

runTest(T: TestCaseType): () == ...

and inside "runTest" it would figure out which "test...: ()->()" functions the given domain T provides. Then it would call all those functions. Of course, here a restricted reflection would suffice and calling a function of type "()->()" should not be a big problem with the type system.

I am somehow reluctant to allow reflections in general, but for certain types of problems (like AldorUnit) it would be quite advantagous. OR the Aldor compiler would support AldorUnit and several other tools (relying on reflections) that people come up with in the future, then reflections are not so important in my eyes.

Ralf




reply via email to

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