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=2.0 required=5.0 tests=DNS_FROM_SECURITYSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 4B945BBAF for ; Sat, 25 Oct 2008 12:14:32 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoIBAIOOAknUGyodkWdsb2JhbACTegEBAQEJCwoHEQOlIIcZg08 X-IronPort-AV: E=Sophos;i="4.33,482,1220220000"; d="scan'208";a="16481574" Received: from smtp3-g19.free.fr ([212.27.42.29]) by mail2-smtp-roc.national.inria.fr with ESMTP; 25 Oct 2008 12:14:32 +0200 Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id D8E0017B5B4; Sat, 25 Oct 2008 12:14:31 +0200 (CEST) Received: from [127.0.0.1] (cac94-7-82-243-25-161.fbx.proxad.net [82.243.25.161]) by smtp3-g19.free.fr (Postfix) with ESMTP id 6BD3A17B5AF; Sat, 25 Oct 2008 12:14:31 +0200 (CEST) Message-ID: <4902F183.5060504@doomeer.com> Date: Sat, 25 Oct 2008 12:14:27 +0200 From: DooMeeR User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Dave Benjamin Cc: Romain Bardou , caml-list caml-list Subject: Re: [Caml-list] What does Jane Street use/want for an IDE? What about you? References: <200810200919.41561.ober.14@osu.edu> <9d3ec8300810211231j40dbbef2ifdd6c2f6b84a2048@mail.gmail.com> <20081021202649.GA11380@philou.ch> <200810220842.17128.ober.14@osu.edu> <49002C0E.5050107@inescporto.pt> <49003554.9050109@lri.fr> <9722eaea0810230313u25b2c874xc94574786e513162@mail.gmail.com> <4900596C.80406@inescporto.pt> <20081023141335.GA521@snarc.org> <49008D7D.4060908@lri.fr> <490096B8.3020602@ramenlabs.com> In-Reply-To: <490096B8.3020602@ramenlabs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 081025-0, 25/10/2008), Outbound message X-Antivirus-Status: Clean X-Spam: no; 0.00; blabla:01 tuareg:01 beginner's:01 ocaml:01 bug:01 beginners:01 wrote:01 readable:01 caml-list:01 caml-list:01 benjamin:01 bin:01 caml:02 caml:02 archives:02 Another possibility is: let x = List.map begin fun z -> very_blabla end my_list in It's quite compact, doesn't run into the margin, is consistent with tuareg, but might be less readable. -- Romain Bardou Dave Benjamin a écrit : > Romain Bardou wrote: >> let x = List.map (fun z -> >> very_long_stuff_blablablablablablablabla) > > I tend to write this sort of thing as: > > let x = > List.map > (fun z -> > very_long_stuff_blablablablablablablabla) > ... > > which, as you may notice, still can't be done with tabs alone due to > the extra space after the opening parenthesis. I'm curious what you > all think of this coding style, which seems on one hand to be > excessively... um, vertical? but it does seem to strike a balance > between Tuareg's indentation rules and the problem of "running into > the margin" too quickly. > > BTW, If you keep the function on the first line, it's a bit more > compact, but the indentation no longer tells the truth about the real > hierarchy: > > let x = List.map > (fun z -> > very_long_stuff_blablablablablablablabla) > ... > > This is why I tend to put the function on a line of its own as soon as > things start to wrap. > > Dave > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs