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 956577F249 for ; Tue, 30 Oct 2012 01:44:06 +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.175; 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.175 as permitted sender) identity=mailfrom; client-ip=134.160.33.175; 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.175 as permitted sender) identity=helo; client-ip=134.160.33.175; 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: Au8AAKYij1CGoCGvl2dsb2JhbABEwywBAQEBAQgWBzuCXUA9FhgDAgECAUsNCAEBiAKaYJETkBySUgOIV40dhWmNVw X-IronPort-AV: E=Sophos;i="4.80,675,1344204000"; d="scan'208";a="179455688" Received: from postman3.riken.jp (HELO postman.riken.jp) ([134.160.33.175]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2012 01:43:46 +0100 Received: from postman.riken.jp (postman3.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 31C1938380DE for ; Tue, 30 Oct 2012 09:43:42 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id F2D8E382021D for ; Tue, 30 Oct 2012 09:43:41 +0900 (JST) Message-ID: <508F22BD.7010103@riken.jp> Date: Tue, 30 Oct 2012 09:43:41 +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: caml-list Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.10.30.3324 Subject: [Caml-list] Why should I use .mli files? Hello, Here is my stupid question of the day: what's the use of those .mli files? Is it just to separate interface from implementation so that the implementation of a module can be changed without clients of its interface to have to bother? Does it make compilation of large software faster by allowing for more parallelization and maybe later on avoiding to recompile some parts? Usually I program in a pure functional style, so my modules don't carry an internal state. I feel like "if someone want to re-use a function, so be it". If I really want to hide a function that I am afraid people may call in an incorrect manner, I declare it internally to some public function and use it correctly. 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. Thanks a lot, Francois.