axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] Equivalence between named domain and %


From: Waldek Hebisch
Subject: Re: [Axiom-mail] Equivalence between named domain and %
Date: Tue, 17 Oct 2006 21:22:03 +0200 (CEST)

Gabriel Dos Reis wrote:
> Waldek Hebisch <address@hidden> writes:
> 
> | Gabriel Dos Reis wrote:
> | > If my understanding is correct, this problem touches upon the fact
> | > that the SPAD compiler does not know (at the moment) how to properly
> | > resolve recursive declaration/definitions of types.  Is that correct?
> | > 
> | > Since, under the hood, almost everything is a pointer, why is the
> | > compiler having trouble admitting recursion?
> | > 
> | 
> | AFAICS Spad types are global and separately compiled. Recursive
> | dependencies are painful when you want separate compilation.
> 
> I don't think so.  This is recursive definition in the *same unit*.
> 

AFAICS:

1) The only way to introduce a new type constructor in Spad is via
   category or domain declaration
2) Each category or domain is a separate compilation unit for Spad
   compiler (even if they live in the same file).
3) Recursive dependencies spanning compilation units are painful.

If you want to change Spad compiler to allow bigger compilation units,
I would support such motion.

> Check out Haskell, or  the excellent book
> "The implementation of Functional Languages", by Simon Peyton Jones.
> 
> | Also, during type checking compiler traverses varoius links (references)
> | between types -- on has to be careful to avoid infinite loops
> | (and when loop is detected how to give sane semantic to the loop).
> 
> Yes, so?
>

Spad compiler seem to use very simple (almost naive) algorithms. You
need smarter approach to handle cycles (smarter algorthms are known,
one just have to implement them...)
 

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

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