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.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id DFA41BBCA for ; Mon, 25 Feb 2008 16:49:02 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHdywkdA6aa1kmdsb2JhbACQXgEBAQEHBAQJChaUKIVF X-IronPort-AV: E=Sophos;i="4.25,401,1199660400"; d="scan'208";a="23006365" Received: from py-out-1112.google.com ([64.233.166.181]) by mail4-smtp-sop.national.inria.fr with ESMTP; 25 Feb 2008 16:49:02 +0100 Received: by py-out-1112.google.com with SMTP id y63so1307078pyg.33 for ; Mon, 25 Feb 2008 07:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=27C7SmGoXOCtSQRP5qpOZG9lk9jEhL7zQtydqjzImw4=; b=x0rveS6L+pBpsZKcsg0+n92M+pgLJz3plJ2SGztPoYkxILjasijK/zCIDgtQFhamm1IxOuDKg4XfyzutD39Fu+UhDuzRo45M6rap26iowiVDiJodFk2R3FPXvmMoMxke7u/Dj9LT571JbS7aMJzC3+qqLnJJa3Y3LpLu+rmVXhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=Y6xjuk99aTYqPbs9rKoS4wmLdvlezyAlXuN2iqKtR3eDkTAHsqkgEZyt5TSJkzsuyD/4/xrJt70E6YrIInl7pHAnlWLnrNrf7jhIb6W+heSx++TK6V+I/BBlebiXq9Am4uiRhpEcwxqBZ+nZfxp6gT7oODIt9lFsA8lHt2Hzi3o= Received: by 10.35.86.12 with SMTP id o12mr3828870pyl.27.1203954540134; Mon, 25 Feb 2008 07:49:00 -0800 (PST) Received: from ?192.168.0.16? ( [69.152.94.154]) by mx.google.com with ESMTPS id n63sm12997797pyh.8.2008.02.25.07.48.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 25 Feb 2008 07:48:59 -0800 (PST) Message-ID: <47C2E369.9080206@gmail.com> Date: Mon, 25 Feb 2008 09:48:57 -0600 From: Edgar Friendly User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: "Tiphaine.Turpin" Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OO programming References: <47BD44FE.3050001@irisa.fr> <20080224163308.GA3459@feanor> <47C288FD.8070602@free.fr> In-Reply-To: <47C288FD.8070602@free.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 mli:01 val:01 mli:01 val:01 ocaml:01 sig:01 edgar:98 char:01 wrote:01 caml-list:01 int:01 int:01 declaration:02 declaration:02 Tiphaine.Turpin wrote: >> or they are required by the GUI >> layer), and that OCaml has now way to seperate method/function >> declaration and type declaration (unless one uses a mli file, which is >> again inconvenient because it splits information that belongs together >> into two complete different places). I'd really appreciate it if one >> could just mix "val" type declcarations with "let" or "method" code >> declarations. >> > I don't understand what you want here. I read him as asking for .ml files to contain what .mli files now contain - i.e. method/function declarations Example - string_annex.ml: val init: int -> (int -> char) -> string let init n f = let s = make n (f 0) in for i=1 to n-1 do set s i (f i); done; s OCaml doesn't permit this at the moment because val statements go in .mli files (or in sig blocks) only. E.