Bill Page <bill.p...@newsynthesis.org> writes:

| On Thu, Apr 2, 2009 at 12:06 AM, Gabriel Dos Reis wrote:
| > Your earlier suggestion
| >
| > Bill Page <bill.p...@newsynthesis.org> writes:
| >  # On the other hand, if there is no OldDomain then it is necessary to
| >  # specify the domain that will represent this new domain. We could do it
| >  # like this:
| >  #
| >  #   Foo(...): with
| >  #       ...
| >  #     == Rep(SomeDomain) add
| >  #       ... rep ... per ...
| >
| > reads to me that somehow the Rep of SomeDomain is exported.
| > I'm saying I would like to see datasets that demonstrate the clear
| > benifits of exporting the representation of a domain.
| >
| > If you're not proposing to export the Rep, then your proposal is a bit
| > obscure to me.  Would you mind clarifying why the above does not
| > amount to exporting the Rep of SomeDomain?
| >
| 
| Because it is not part of the 'with' clause and appears to the right
| of ==.

But with your construct, in the capsule I would be able to tell what
Rep(SomeDomain) is.   That reveals the Rep of SomeDomain, and
effectively exports it.

| Similarly, the operations of OldDomain are not automatically
| exported in
| 
|    Foo(...): with
|        ...
|      == OldDomain add
|        ... rep ... per ...
| 
| The result is exactly the same as if I had written:
| 
|    Foo(...): with
|        ...
|      == add
|        Rep==SomeDomain
|        ... rep ... per ...

No, the result is not the same.  In the second form, you'll have to
write bunch of functions (for Foo) that implement functions
implemented by OldDomain and exported by both.

| In SPAD a natural variant might also allow replacement of the
| parenthesis with indentation. For example:
| 
|    Foo(...): with
|        ...
|      == Rep
|              Record(A: ...
|                         B: ...)
|           add
|             ... rep ... per ...
| 
| ---
| 
| The point of this construction is just to give Rep a more prominant
| place in the SPAD syntax and make it syntactically incorrect to
| specify Rep in the case of add-inheritance or by placing it in some
| odd location in the body of the domain.

It is already the case that if you define Rep in an add-inheritance,
you get a diagnosyic.  I don't understand the comment about 'odd'.

-- Gaby

------------------------------------------------------------------------------
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to