axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Unions in Spad


From: Bill Page
Subject: Re: [Axiom-developer] Unions in Spad
Date: Sun, 8 Jul 2007 21:50:08 -0400

On 08 Jul 2007 17:51:54 -0400, Stephen Wilson wrote:
...
But I think Aldor's treatment of selectors as elements of type
Enumeration is worth looking at and possibly worth making explicit in
Spad.  Spad seems to follow similar semantics conceptually but I cant
see the direct connection to the type system at this time.


Gaby noted in another thread that Spad does in fact already implement
Enumeration as a basic data type even though it is completely
undocumented at the user level.

But really I think the concept of "selectors" in both Union and Record
is at best a legacy of earlier days in programming language design. It
makes much for sense to me to define Union and Record as co-limit and
limit in the sense of category theory. Then Union selectors are just
injections operations and Record selectors are projection operations
which are exported like any other function from these types. There is
no need for any lower level language construct.

Regards,
Bill Page.




reply via email to

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