So really in Aldor when writes

 Union(x:Integer, y:String)

one is using the same conventions. So as Waldek implied, the fact that
Aldor currently does not allow

 Union(Integer, String)

is not really a syntactic issue but rather a semantic one.

Unfortunately, the Aldor mailing list is dead. --- No replies to my recent question.

http://www.aldor.org/pipermail/aldor-l/2007-July/000643.html

Anyway, I would not say that Aldor does not allow "Union(Integer,String)". No hint in the AUG, but look at the error message given in
http://lists.nongnu.org/archive/html/axiom-developer/2007-07/msg00181.html

If you rewrite this program to

    U == Union(machInt: MachineInteger, sStr: String);

(just change this line) and then look at the error message.

woodpecker:~/scratch>aldor -laldor -fx aaa.as
"aaa.as", line 13:         if u case MachineInteger then {
                   ..................^
[L13 C19] #1 (Error) Argument 2 of `case' did not match any possible parameter type.
    The rejected type is Join(
                PrimitiveType with
                    ....
    Expected one of:
      -- Enumeration(machInt: Type)
      -- Enumeration(sStr: Type)

It looks as if one also could do

  if u case MachineInteger then ...

with the current Aldor compiler, I just don't know how to type "MachineInteger" since the compiler immediately takes the *type* MachineInteger and not the *tag* MachineInteger.

Anyway, that usage of MachineInteger is not specified in the AUG so maybe one better does not use it that way.

Ralf


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

Reply via email to