Browse thread
(int * int) <> int*int ?
- Frédéric_Gava
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-02-23 (17:24) |
From: | Frédéric_Gava <gava@u...> |
Subject: | (int * int) <> int*int ? |
Hi, is anybody can semantically explain why this 2 types are differents ? # type t=A of int*int and t'= B of (int*int);; type t = A of int * int and t' = B of (int * int) # A (2,3);; - : t = A (2, 3) # B (2,3);; - : t' = B (2, 3) # let a=2,3;; val a : int * int = (2, 3) # (A a);; The constructor A expects 2 argument(s), but is here applied to 1 argument(s) # (B a);; - : t' = B (2, 3) I understand that it'is force you to have a pair for A and not just a value of type pair but why this restriction ? It is not easy to explain why int*int <> (int*int). Thanks ! Frédéric Gava