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
RE: [Caml-list] @, List.append, and tail recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-02-03 (09:26)
From: Harrison, John R <johnh@i...>
Subject: RE: [Caml-list] @, List.append, and tail recursion
| Actually, recursion seems to be very cheap- the recursive append function 
| is signifigantly faster than the reversing append, and almost as fast as 
| the set_cdr function.

Yes indeed. This is why I think we shouldn't discourage people from using
recursion by imposing arbitrary depth limits.

| > and at least the implementation
| > would do its best to carry recursions as far as possible. The only
| > reason I can see for placing a limit on the stack size is that users
| > become aware of trivially looping recursions more quickly. But this
| > doesn't seem a particularly strong argument.
| I like becoming aware of problems in my code as quickly as possible.  It 
| lets me fix them quicker.

Surely looping recursions aren't such a common problem that it really
matters much? And one has other cues, like the excessive time taken by the

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: