
From:  Ralf Hemmecke 
Subject:  Re: [Axiomdeveloper] Re: fixing SPAD 
Date:  Sat, 19 May 2007 19:16:07 +0200 
Useragent:  Thunderbird 2.0.0.0 (X11/20070326) 
From aggcat.spad.pamphlet:if Entry has SetCategory and % has finiteAggregate then entry?: (Entry,%) > Boolean ++ entry?(x,u) tests if x equals \axiom{u . i} for some index i. Form aggcat2.spad.pamphlet: if B has ListAggregate(R) or not(B has shallowlyMutable) then  A is a listoid, and B is either listoids or not mutable map(f, l) == construct [f s for s in entries l] So, as Martin wrote simple boolean operators already work. I belive that there are restrictions, namely that more complicated expressions do not work.
Martin, correct me if I am wrong... But I guess Martin meant that something like
define ResidueClassRing(R: CommutativeRing, p: R): Category == with { Ring; if prime? p then Field; ... } which would be perfectly fine in Aldor does not work in SPAD.In contrast to "has", "is", "and", etc. the function "prime?" is not defined by the language and thus cannot be evaluated at compile time. In Aldor that is delayed until the time that category is first used (at runtime). Only then the actual exports are computed.
Ralf
[Prev in Thread]  Current Thread  [Next in Thread] 