Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2008-10-26 (19:49)
From: Martin Jambon <martin.jambon@e...>
Subject: Re: Indentation (was Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?)
Daniel Bünzli wrote:
> Le 26 oct. 08 à 01:08, Martin Jambon a écrit :
>> In performance-critical code or maybe imperative code in general, it
>> feels good to control when closures are created. In such cases, avoiding
>> local functions helps.
> Just to be clear, naming your anonymous function locally (which is what
> is recommended) or not naming it doesn't make any performance difference

What I mean is that:

let f x y = x + y

let g x l = (f x) l

is clearer than:

let g x l =
  let f y = x + y in f l

in the sense that it is obvious that a closure is created in the first
case, while it is less visible in the second case.