axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Axisp news


From: Stephen Wilson
Subject: Re: [Axiom-developer] Axisp news
Date: 26 Jun 2007 15:12:12 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Martin,

Martin Rubey <address@hidden> writes:
> Stephen Wilson <address@hidden> writes:
> 
> > Martin Rubey <address@hidden> 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))
> }

Ah!  So terribly simple.  My thinking was reaching for exactly this
kind of construction.  Basicly my proposal extends the destructuring
of a tuple type to an arbirary type constructor, but it would
certainly not be necessary.  Your rendition would be sufficient.  Many
thanks for the insight!

> > 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.

There is a mailing list?  I could lurk there and contribute as appropriate.

> 
> All the best,
> 
> Martin


Many thanks,
Steve





reply via email to

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