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: Gabriel Dos Reis
Subject: Re: [Axiom-developer] Unions in Spad
Date: 11 Jul 2007 08:05:32 -0500

Stephen Wilson <address@hidden> writes:

| *,
| 
| During my work figuring out the defintrf.spad bug, I noticed a
| shortcoming in the handling of unions.
| 
| Spad, internally, has two notions of Unions.  The first variety might
| be termed `regular', the other is, not surprisingly, termed `new'.
| 
| Regular Unions do not have tags associated with branches. For example:
| 
|       Union(Integer, String)
| 
| New Unions have tags, as in
| 
|       Union(int: Integer, str: String)

Both are documented in the Axiom book by Jensk and Sutor.

I believe, they are almost right.  Except one thing that I consider
a bug, not a feature:  the labels in unions and records should be
properly scoped/predicated instead of being dumped into the global space.

-- Gaby




reply via email to

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