From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4F239BBAF for ; Tue, 6 Oct 2009 14:01:35 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYDAB/OykqBaB4OgWdsb2JhbACadwEBFiS3TIQqBA X-IronPort-AV: E=Sophos;i="4.44,513,1249250400"; d="scan'208";a="35765026" Received: from mx-a.polytechnique.fr ([129.104.30.14]) by mail3-smtp-sop.national.inria.fr with ESMTP; 06 Oct 2009 14:01:34 +0200 Received: from argos.lix.polytechnique.fr (argos.lix.polytechnique.fr [129.104.11.2]) by mx-a.polytechnique.fr (tbp 5.3.2/2.0.7) with ESMTP id n96C1Yif025117 for ; Tue, 6 Oct 2009 14:01:34 +0200 Received: from [192.168.112.181] (sphinx.lix.polytechnique.fr [129.104.11.1]) by argos.lix.polytechnique.fr (Postfix) with ESMTP id 369A3F59C8 for ; Tue, 6 Oct 2009 14:01:34 +0200 (CEST) Message-ID: <4ACB319A.1080608@wanadoo.fr> Date: Tue, 06 Oct 2009 14:01:30 +0200 From: Chantal KELLER User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: caml-list Subject: Constructors are not functions Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; constructors:01 ocaml:01 constructors:01 foo:01 foo:01 foobar:01 foobar:01 partial:01 functions:01 functions:01 constructor:01 constructor:01 int:01 int:01 argument:02 Dear Ocaml users, Is there a reason for constructors not to behave like functions? For instance, one cannot make a partial application from a constructor: # type foo = | Bar of int;; type foo = Bar of int # let foobar = Bar in foobar 17;; Error: The constructor Bar expects 1 argument(s), but is applied here to 0 argument(s) Thanks, -- Chantal KELLER