Stephen Wilson <[EMAIL PROTECTED]> writes: > Martin Rubey <[EMAIL PROTECTED]> writes: Big difference is that with > a parametrized type, the parametrization forms a part of the `public > interface' to the type. No domain/category should be allowed to `hide' their > parametrization, nor should they ever need to explicitly `export' them, as > you mentioned RectangularMatrixCategory does.
OK. The way I see aldor (and SPAD) is, that they simply allow functions that produce types. I'm not sure whether that is the same as a parametrized type. I do not see why a domain should not be allowed to hide it's parametrization. In fact, if you need access to a parameter, it is easy (in Aldor) to gain access using "extend". > Ah, sorry. Should have been something like: > > mkMod(n : Integer) : IntegerMod( ? ) == > foo(n)::IntegerMod(compute(n)) But how are you going to compute with a result whose type you do not really know. I (meanwhile) really prefer something like mkMod(n : Integer) : (m: Integer, IntegerMod m) == { (m := compute n, foo(n)::IntegerMod(m)) } > Note that sal_fltgmp does not consistently check. You may want to test that > calling add!(0, 1) on a gmp float actually changes the value of `0' to `1'. I checked, you are right. > > Maybe you want to join our discussion on how to implement multisort species > > in Aldor? There, we are pushing the limits of Aldor, I guess. Also, the > > parser and domain generator I wrote shows some features one may want to > > have. > > I am afraid I would not be able to contribute much to that discussion. I'm quite sure that this is not true. But even if true, it might make clearer which features the language lacks. All the best, Martin _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer