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 A2F7E7F249 for ; Tue, 30 Oct 2012 13:29:44 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail4-smtp-sop.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: Am4BAFfHj1BKN1ZKnGdsb2JhbABEhhi9QAEBAQEBCAsJCRQngh4BAQQBI1YFCwsaAiYCAkcQBhuHeAYEqgaCO5A3gSCKVYVKMmEDkkKJCBONSQ X-IronPort-AV: E=Sophos;i="4.80,679,1344204000"; d="scan'208";a="160880065" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail4-smtp-sop.national.inria.fr with ESMTP; 30 Oct 2012 13:29:43 +0100 Received: from [192.168.0.100] (11-233.197-178.cust.bluewin.ch [178.197.233.11]) by smtp.webfaction.com (Postfix) with ESMTP id 7E7212078D65; Tue, 30 Oct 2012 07:28:18 -0500 (CDT) Date: Tue, 30 Oct 2012 13:28:15 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Francois Berenger Cc: caml-list Message-ID: In-Reply-To: <508F3D3D.3070600@riken.jp> References: <508F22BD.7010103@riken.jp> <508F3D3D.3070600@riken.jp> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] Why should I use .mli files? Le mardi, 30 octobre 2012 =C3=A0 03:36, Francois Berenger a =C3=A9crit : > > For me, a program that lacks mli files means lack of design, abstractio= n and documentation and hence equates with rubbish. >=20=20 >=20=20 > Thanks for the compliment. Oh don't take it personally it also happens to me.=20=20 > 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 I personnally find none of these arguments very compelling. And if you are = interested in correct software, you better have a good/understandable desig= n and mli files help you with that. > > At that moment simple things like being able to distinguish between=20= =20 > functions/types that are local to a module and those that are used by=20= =20 > other part of the program is immensely useful. >=20=20 > 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 parameter= s. > I also quite know my swiss knives (egrep and co). I don't really think that this approach scales if you need to get in touch = with a code base that you didn't write --- and remember, for most persons, = after a year, your own code looks like code that you didn't write yourself. > OK, so you too are a top-down design practitioner > and use .mli files to this end. Well not necessarily, I mean things are no so clear cut, design informs imp= lementation and vice-versa. It's not as if I necessarily get the mli files = right from the start and then just implement them and everything works, it'= s a refinement process. It also happens to me start the ideas in an ml file= s and then gradually split it into different modules when it becomes clear = what functions/types form the modular units of the programs.=20=20 What is essential to me with mli files is that it makes you think about you= r program modularity. And modularity is an essential tool for both program = understanding and maintenance. Best, Daniel