> It may be useful to have a constructor which create a record :

> AList := [  11,22,33 ] 
> Arec  := [| 123, "azerty", 1.2e-3 |] and used with Arec.1, Arec.2 or Arec.3

I am not so sure about Axiom, but in Aldor each type can provide a 
function "bracket". The compiler then translates

   [x,y,z,t]

into

   bracket(x,y,z,t).

In particular List and Record provide such bracket function of type

(in List(T))
   bracket: Tuple T -> %
which allows the usual list construction.

(in Record(a: Integer, b: String, c: Float))
   bracket: (Integer, String, Float) -> %
which allows

   Arec: Record(a:Integer, b:String, c:Float) := [123,"azerty",1.2e-3]

What else would you want?

Ralf

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to