Version française
Home     About     Download     Resources     Contact us    
Browse thread
(int * int) <> int*int ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Frédéric_Gava <gava@u...>
Subject: Re: [Caml-list] (int * int) <> int*int ?
> type a {
>     A : int;
>     B : (int , int); // 2 arguments
>     C : ((int , int)); // 1 tuple argument
> }

Personnaly, I prefer the "revisited syntax of ocaml" solution with "B:int
and int" but I would like to write my programs with (B 1 2) instead of (B
(1,2)) which is too close to "C (1,2)" and maybe its more efficient since we
do not have to build the pair (1,2)...and it seems to me more "logic"  to
have a constructor with n arguments to be apply to n arguments instead of a
nuple of arguments...(I remenber that the ZINC could optimize the code when
the function is apply to all its arguments and that the ZINC works better
with currified functions...is not true ?)

FG