From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 5D47F7F24A for ; Wed, 31 Oct 2012 10:59:19 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiMBAJf1kFBKN1ZKnGdsb2JhbABExBABAQEBAQgLCQkUJ4IeAQEEATIBBUYLCyETEg8CLBoGiBMGBLtjkjMDm0yNXA X-IronPort-AV: E=Sophos;i="4.80,687,1344204000"; d="scan'208";a="179656095" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail1-smtp-roc.national.inria.fr with ESMTP; 31 Oct 2012 10:59:18 +0100 Received: from Hehey.local (23-233.197-178.cust.bluewin.ch [178.197.233.23]) by smtp.webfaction.com (Postfix) with ESMTP id 50B9B207CF4D for ; Wed, 31 Oct 2012 04:59:15 -0500 (CDT) Message-ID: <5090F66F.60803@erratique.ch> Date: Wed, 31 Oct 2012 10:59:11 +0100 From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= User-Agent: Postbox 3.0.5 (Macintosh/20120826) MIME-Version: 1.0 To: "caml-list@inria.fr" References: <508F22BD.7010103@riken.jp> <026F32A8-2790-4CDD-A839-58655A8074CA@first.in-berlin.de> <508FE869.3070603@inria.fr> <508FFB12.9030307@gmail.com> <508FFE82.2050409@inria.fr> <50900466.2050000@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Why should I use .mli files? Gabriel Scherer a écrit : > Allowing signatures items in structures and .ml files alone does not > increase the expressivity of the language. I'm against this idea. This means that you have to skim trough the whole ml file to actually understand what the module signature is. This is very inconvenient. I think it's again the symptom of focusing on program writing whereas the focus should be on reading programs. The latter actually happens more than the former. I look forward to the day language designers will focus on readability rather than brevity (look ! my ununderstandable two liner solve this very complex problem by having all this implicit stuff going on). Now at a certain point I was also annoyed by the problem you mention but I think it can be solved by something like typerex or an interactive mode to the compiler that would allow you to reconcile a signature with its implementation when there is a module signature mismatch (asking questions like keep the mli type one or the ml type and updating the files accordingly). Best, Daniel