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 91FA97F249 for ; Tue, 30 Oct 2012 03:36:50 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.161; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.161 as permitted sender) identity=mailfrom; client-ip=134.160.33.161; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.161 as permitted sender) identity=helo; client-ip=134.160.33.161; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvMAAAU9j1CGoCGhmWdsb2JhbABEhhi5U4N1AQEBAQEICwsHFCeCHgEBBAEjDwEFQAEFCwsYAgIFFgsCAgkDAgECAUUGDQEHAQGHfAapQII7kB2BIIpVhUqBEwOIV4lrgzKFaY1X X-IronPort-AV: E=Sophos;i="4.80,676,1344204000"; d="scan'208";a="179461008" Received: from postman1.riken.jp (HELO postman.riken.jp) ([134.160.33.161]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2012 03:36:49 +0100 Received: from postman.riken.jp (postman1.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 22AF432C00EA; Tue, 30 Oct 2012 11:36:46 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id E98EF32A0043; Tue, 30 Oct 2012 11:36:45 +0900 (JST) Message-ID: <508F3D3D.3070600@riken.jp> Date: Tue, 30 Oct 2012 11:36:45 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= CC: caml-list References: <508F22BD.7010103@riken.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.10.30.22717 Subject: Re: [Caml-list] Why should I use .mli files? On 10/30/2012 10:19 AM, Daniel Bünzli wrote: > Le mardi, 30 octobre 2012 à 01:43, Francois Berenger a écrit : >> Also, maybe I only work on toy-size OCaml projects. So, I never >> bothrered to create any .mli file. >> I would like to know if I should bother about them. > > For me, a program that lacks mli files means lack of design, abstraction and documentation and hence equates with rubbish. Thanks for the compliment. To my defence, my main programming goal because of my employer and colleagues is to deliver fast and correct (software) in order to investigate research ideas. We don't deliver libraries or things targeting at a wide developer audience (we don't do research in computer science, also). > For example at a certain point you (or others) will read your code. I don't have any problem reading my code. It reads like an English text usually. >At that moment simple things like being able to distinguish between functions/types that are local to a module and those that are used by other part of the program is immensely useful. Well, if I want to know this, I change the function parameters and let the compiler tell me where it was used with the initial parameters. I also quite know my swiss knives (egrep and co). > And that's only one of the purpose of mli files. > > In fact mli files are the first thing I write when I design programs. OK, so you too are a top-down design practitioner and use .mli files to this end. Thanks, F.