Bill, Waldek,

Thank you both for your replies!

I think the consensus is that `hybrid' Union types are not desirable.
Consequently, I will look into making Spad strictly enforce this.  In
addition, the constraint that an untagged Union not have identically
typed branches, and that in the tagged case all branch names are
distinct.

"Bill Page" <[EMAIL PROTECTED]> writes:
[...]
> Thinking out load: Perhaps this use of ':' should be given explict
> operator semantics so that it could be considered as just a pretty
> form of type constructor, e.g.
> 
>   Keyword(x:Symbol,T:Type): ... with KeywordCategory ...
>     == T add ...
> 
> (not withstanding that it's usage here is recursive). Then as a type
> it would be easy to insist that a parameter to a constructor be of
> this type by requiring KeywordCategory.
> 
> Does this make sense?

If we were to support keyword arguments, the binding of arguments
would need to be part of the type.  I believe that what you are
suggesting is essentially how one one would need to view `x : T' when
implementing the facility.


Sincerely,
Steve



_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to