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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 768737F249 for ; Tue, 30 Oct 2012 15:32:30 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=pra; client-ip=192.109.42.8; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=mailfrom; client-ip=192.109.42.8; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@einhorn.in-berlin.de) identity=helo; client-ip=192.109.42.8; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="postmaster@einhorn.in-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQBAIrkj1DAbSoIe2dsb2JhbABEw0gjAQEWJgQjgh4BAQQBOj8FCwsOOFcGE4gABgSsY5A7i3eFfGEDlXWFaY1J X-IronPort-AV: E=Sophos;i="4.80,679,1344204000"; d="scan'208";a="160896597" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Oct 2012 15:32:02 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from [2.164.88.53] (tmo-106-86.customers.d1-online.com [80.187.106.86]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id q9UEW0ek029775 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 30 Oct 2012 15:32:01 +0100 References: <508F22BD.7010103@riken.jp> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Message-Id: <026F32A8-2790-4CDD-A839-58655A8074CA@first.in-berlin.de> Cc: Francois Berenger , caml-list X-Mailer: iPad Mail (10A403) From: Oliver Bandel Date: Tue, 30 Oct 2012 15:32:14 +0100 To: Anton Lavrik X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] Why should I use .mli files? Am 30.10.2012 um 07:12 schrieb Anton Lavrik : > Hi Francois, > > I don't use .mli files that much. Granted, I'm a rather casual OCaml > user, but hey, at least you are not alone :) > > I'm surprised by some of the comments you've received. The fact that > some people tend to practice top-down coding more than others doesn't > really mean anything. Other people do it differently even regardless > of the language they use. For me, paper and pencil are far more useful > than .mli files up until the interfaces converge and stabilize. > > In general, .mli files are useful and even essential for libraries and > large projects. For instance, they allow to clearly (and cleanly) > define interfaces and help with separate compilation (i.e. to avoid > recompiling parts). > > The biggest inconvenience with .mli files as I see it is that I have > to repeat myself and make related but slightly different changes in > two places when I change a module implementation. I would very much > prefer to declare and document public interfaces next to the > implementation and have language tooling take care of separate > compilation and documentation generation. ocamlc -i is your friend... Ciao, Oliver