On Wed, 24 Oct 2007, Bill Page wrote: | > | So under my proposal 'for i in PositiveInteger repeat' should function | > | identically to the way | > | | > | for i in 1.. repeat | > | > so you want to treat a domain as being identical to its ordered list | > of values. But, a domain is not (just) its set of values. | | Of course you are right. I do *not* want to treat a domain as being | identical to it's ordered list of values. A domain is many other | things besides that. However I see no reason why most domains (at | least those in the categories Finite and StepThrough) should not | provide a standard mechanism for doing such iterations.
I'm NOT arguing that there should not be convenient ways to define iterations over domains. I'm just pointing out some specific suggestions have problems and we should first try to understand the problem deeper. Once, I get to office, I'll provide links to some recent work on iterating over some combinatorial structures and their complexities. | > About about | > | > for i in List(Integer) repeat | > | > or | > | > for n in BinaryTree(Integer) repeat | > | | Yes, List and BinaryTree should be able to provide such iterators. In this example, what would they be? What be the values iterated on? | Sometimes (in particular in these cases) it is difficult to define a | "standard" ordering but the particular default ordering that is chosen | in each case can be easily documented and the alternatives produced by | some auxillary operation or coercion. You see, we have not reached understanding on the semantics and its implications. And we can't just rely on `document the choice' to solve the problem. I would have a problem with that if we were just fiddling with a small scripting language that will die in a week. -- Gaby _______________________________________________ Axiom-math mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-math
