Browse thread
RE: [Caml-list] @, List.append, and tail recursion
- Harrison, John R
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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 evaluation. John. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners