Ralf Hemmecke <r...@hemmecke.de> writes: | 1) f: T | 2) f: constant -> T | 3) f: () -> T | | Let me repeat so that I am sure I understood what you said. In OpenAxiom | one can use (1).
Correct. | (2) is now obsolete (or even removed or just used in the runtime system). (2) is still supported for compatibility with other AXIOMs that have not made the jump yet, and because I did not have time to change the working algebras. | (3) would be different from (1). In all flavours of AXIOMs, the runtime system think of (1) differently from (3). For (1) the result of calling the first time is cached, while (3) is treated just like any function. | So in short, it looks like OpenAxiom is similar to Aldor by letting | (1) define constants and (3) define nullary functions. I like that. That is correct. | > In OpenAxiom-1.2.2 (current active release branch) you can also ^^^^^^^^^^^^^^^ this should read OpenAxiom-1.4.2 | > define constants with name 3, 4, 5, etc. with your own type. (There | > might remain some infelicities in the interpreter.) | | Interesting. Aldor allows to define the value of Literal(s), I toyed with the idea (or variation of) Literal domain and eventually decided not to do it now because I see several valid designs. | but I don't thing that one can write | | Dom: with { | 2: % | } == add { | ... | 2: % == some_fancy_value | } | | Such would be possible in OpenAxiom? Yes. Given this )abbrev domain MYDOM MyDomain MyDomain(): Public == Private where Public == SetCategory with 2: % ++ two Private == Symbol add 2 == per 'two after compilation, evaluation of 2$MyDomain yields (1) -> 2$MyDomain (1) two Type: MyDomain As I said earlier, there are som infelicities left in the interpreter. Otherwise support in the compiler (therefore library) is there (OpenAxiom-1.4.2.) | > OpenAxiom allows you to define a constant with any "atomic" name | > (including non-negative integer literal names.) | | What is an "atomic name"? I meant identifiers, including operator names without leading underbars, and non-negative integer literals. -- Gaby ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel