From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA16682 for caml-red; Fri, 30 Jun 2000 17:33:07 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA06988 for ; Fri, 30 Jun 2000 02:42:40 +0200 (MET DST) Received: from emissary.ot.com.au (emissary.ot.com.au [203.42.249.64]) by concorde.inria.fr (8.10.0/8.10.0) with SMTP id e5U0gV114776 for ; Fri, 30 Jun 2000 02:42:33 +0200 (MET DST) Received: (qmail 22028 invoked from network); 30 Jun 2000 00:42:27 -0000 Received: from unknown (HELO druid.in.ot.com.au) (10.70.80.5) by 10.70.15.1 with SMTP; 30 Jun 2000 00:42:27 -0000 Received: (qmail 23338 invoked from network); 30 Jun 2000 00:42:27 -0000 Received: from unknown (HELO in.ot.com.au) (10.70.82.63) by druid.in.ot.com.au with SMTP; 30 Jun 2000 00:42:27 -0000 Message-ID: <395BECF3.23389442@in.ot.com.au> Date: Fri, 30 Jun 2000 10:42:27 +1000 From: Max Skaller Organization: Open Telecommunications Ltd X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Daniel de Rauglaudre CC: caml-list@inria.fr Subject: Re: convenient features References: <3959C916.D1A3BDFD@enseeiht.fr> <20000629111918.K28841@jaune.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Daniel de Rauglaudre wrote: > If Ocaml chooses for you, it can be a problem if you want to make side > effects in some order while executing these modules. Then you could either: 1) add a dummy dependency in, to force the ordering This is a hack, but so is using side effects to initialise modules :-) 2) think about a language feature to replace the dummy dependency. In Python, you have to explicitly import a module before you can use it. In C, you have to explicitly #include a file before you can use the resources it represents the interface for. In ocaml, the lack of such a requirement could be viewed as a design flaw: it is hard to tell what a module depends on by inspection ( you have too look at every line of code carefully to find which names are module names). An 'import' or 'use' statement might also allow a local name for the module. (Unlike 'open', a such a statement doesn't make the symbols defined in the module available unqualified). A possible extension: to instantiate a functor (i.e. use an instance of a functor module). -- John (Max) Skaller at OTT [Open Telecommications Ltd] mailto:maxs@in.ot.com.au -- at work mailto:skaller@maxtal.com.au -- at home