[Top][All Lists]

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

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

From: Gabriel Dos Reis
Subject: Re: [Aldor-l] [Axiom-developer] Re: exports and constants
Date: 25 Jul 2006 03:41:02 +0200

"Bill Page" <address@hidden> writes:

| On July 24, 2006 9:10 PM Gaby wrote:
| > 
| > Bill Page writes:
| > [...]
| > | But perhaps "has" is not so weak. What other applications of
| > | reflection are there other then conditional ones?
| > 
| > Support for generic programming.
| > 
| >
| >
| >
| It is clear isn't it, that one of the primary motivations for Aldor
| (at least in the context of Axiom) is to provide exactly this sort
| of "generic programming"? It seems to me that this is done using
| only "has" and polymorphic types.

I have programmed a bit in Generic Haskell to assert that, no Aldor's
"has" is no substitute.  You can try to simulate, but you will not be

| In Andres Loh's thesis it says:
| "The possibility to define functions by analysis of the structure
| of datatypes is what we call generic programming in the context of
| this thesis."
| How would more general forms of reflection within Aldor help to
| achieve this?

Please, download Generic Haskell and do some experiment by yourself.
Look at the resulting codes in each case.

(On performance side, last month, a colleague of mine and I did some
experiments by writing a small Computer Algebra library in Haskell 98
and Generic Haskell.  Disappointingly, there is a slowdown factor
between 7 and 10 when going from Haskell to Generic Haskell.  We don't
know yet which part can be credited to the maturity of the compiler
and which part is inherent to the approach.  Anyway, it was an
interesting experience). 

-- Gaby

reply via email to

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