axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Spad and its object model


From: Martin Rubey
Subject: Re: [Axiom-developer] Spad and its object model
Date: 11 Jun 2007 09:46:37 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Stephen Wilson <address@hidden> writes:

> I would need a clear picture of what the semantics would be for "post facto
> extensions".  Do you sugest following Aldor explicitly?

In any case, please try to "stay" compatible with Aldor semantics as far as
possible!  

> IIRC new exports introduced by `extend' are not visible to previous
> definitions, except via `has' predicates which execute during runtime.  Are
> there other issues involved?

I do not understand.  What is a "previous" definition in Aldor?

Martin

address@hidden:~/aldor-test$ aldor -fx -laldor extend.as 
address@hidden:~/aldor-test$ ./extend
Hi there!

-------------------------------------------------------------------------------
#include "aldor"
#include "aldorio"

f(i: Integer): String == {
        import from Integer;
        foo i;
}

extend Integer: with {
        foo: % -> String;
} == add {
        foo(i: %): String == "Hi there!";
}

main(): () == {
        import from Integer, Character, TextWriter;
        stdout << f(1) << newline;
}

main()





reply via email to

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