Version française
Home     About     Download     Resources     Contact us    
Browse thread
What does Jane Street use/want for an IDE? What about you?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Benjamin <dave@r...>
Subject: Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?
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