From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CEF11BC0A for ; Fri, 16 Mar 2007 00:08:32 +0100 (CET) Received: from orion.metastack.com (no-dns-yet.demon.co.uk [80.177.38.218] (may be forged)) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2FN8UIH014072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 16 Mar 2007 00:08:31 +0100 Received: from treble (cpc2-cmbg6-0-0-cust535.cmbg.cable.ntl.com [81.107.34.24]) (authenticated bits=0) by orion.metastack.com (8.13.4/8.13.3) with ESMTP id l2FMIcEB008407 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 15 Mar 2007 22:18:39 GMT From: "David Allsopp" To: References: <20070315224000.674E3BC82@yquem.inria.fr> Subject: Re: [Caml-list] Style and organization of code Date: Thu, 15 Mar 2007 23:08:28 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <00ca01c76756$d8492870$6a7ba8c0@treble> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcdnTCNB6iVjsKIBRJyy8aQAgaah5gACDUiw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <20070315224000.674E3BC82@yquem.inria.fr> X-Miltered: at concorde with ID 45F9D1EE.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; unreadable:01 unreadable:01 notation:01 underscores:01 notation:01 underscores:01 amusing:01 mli:01 ocamlc:01 foo:01 foo:01 mli:01 wrote:01 caml-list:01 functions:01 > On Wed, Mar 14, 2007 at 05:25:37PM -0500, ian wrote: > > Say I have a function called "solveHardProblem". > > Ack! studlyCaps is horrible and unreadable (I know - I'm currently > involved in a project which uses them). Try "solve_hard_problem" > instead. Horrible and unreadable? We seem to be forgetting that camel notation versus underscores is entirely a matter of taste... I have no problem reading camel notation and find underscores ugly (not to mention harder to type than caps). I've always found the argument "the standard library uses this notation" to be a very weak argument typically coming from more senior programmers who're clutching at straws to justify their opinions ;o) I'm glad that, most of the time, the only standard library functions I use with underscores are {type}_of_{other type} or {to|from|of}_{type} so don't happen too often. (amusing aside: I once worked for a company that mixed the two... giving solve_Hard_Problem which was particularly tedious!!) > You don't need to create a separate .mli (in fact, you sometimes > can't). Eh? When does ocamlc -i Foo.ml > Foo.mli ever fail? I too always pair a .mli file with a .ml file even if the signature is exactly the same.