DooMeeR wrote:
> 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.

Now I generally tend to use this:

let x =
  List.map (
    fun z ->
      very_blabla
      ...
  ) my_list
in
...

I find that the most significant barrier is of psychological nature.
This formatting of parentheses is unnatural in natural languages and in
mathematics.

Other than that, it's no different from curly braces as used in the
C-like syntaxes.

The additional 2 or 3 lines are generally negligible and introduce some
vertical spacing which improves readability.


Martin

-- 
http://mjambon.com/

_______________________________________________
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

Reply via email to