[Caml-list] Examples where let rec is undesirable

2012-01-02 Thread Diego Olivier Fernandez Pons
List, I was wondering if there was any reason not to make let rec the default / sole option, meaning cases where you clearly don't want a let rec instead of let (only in functions, not cyclic data). Diego Olivier -- Caml-list mailing list. Subscription management and archives:

Re: [Caml-list] Examples where let rec is undesirable

2012-01-02 Thread Alexandre Pilkiewicz
Hi Diego. I think one of the best reason to *not* have let rec as the default is shadowing. Say you have a function that expect a string as an argument let foo s = and you realize that it's the job of the callee and not the caller to check that the string is escaped. You can just

Re: [Caml-list] Examples where let rec is undesirable

2012-01-02 Thread Lukasz Stafiniak
On Mon, Jan 2, 2012 at 11:37 PM, Diego Olivier Fernandez Pons dofp.oc...@gmail.com wrote:     List, I was wondering if there was any reason not to make let rec the default / sole option, meaning cases where you clearly don't want a let rec instead of let (only in functions, not cyclic data).

Re: [Caml-list] Examples where let rec is undesirable

2012-01-02 Thread Martin Jambon
On 01/02/2012 04:05 PM, Lukasz Stafiniak wrote: On Mon, Jan 2, 2012 at 11:37 PM, Diego Olivier Fernandez Pons dofp.oc...@gmail.com wrote: List, I was wondering if there was any reason not to make let rec the default / sole option, meaning cases where you clearly don't want a let rec