"Bill Page" <[EMAIL PROTECTED]> 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. | > | > http://haskell.org/th/ | > http://www.iai.uni-bonn.de/~loeh/ExploringGH.pdf | > | | 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 there. | 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 _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer