caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml and tail recursion
@ 1999-12-13 17:27 Norman Ramsey
  1999-12-14  8:20 ` Xavier Leroy
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Norman Ramsey @ 1999-12-13 17:27 UTC (permalink / raw)
  To: caml-list; +Cc: nr

Dear Camllists,

I have just completed my first nontrival Caml program (an implementation
of the rsync algorithm) and I am distressed about the treatment of
tail calls.  My code has to go through files one character at a time,
and as an SML programmer from way back, I wrote the code using three
mutually recursive functions that make tail calls to each other.
Imagine my surprise when I started getting errors with stack overflow!
Apparently ocamlc doesn't optimize tail calls.  I made some progress
by using ocamlopt, but I miss being able to use the debugger.
Do experienced Camllists have any suggestions?


Norman




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-12-15 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-13 17:27 OCaml and tail recursion Norman Ramsey
1999-12-14  8:20 ` Xavier Leroy
1999-12-14 15:32 ` Alain Frisch
1999-12-14 21:20 ` Jerome Vouillon
1999-12-15 14:10   ` Jean-Francois Monin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).