Browse thread
tail rec
-
skaller
- Erik de Castro Lopo
-
Basile STARYNKEVITCH
-
skaller
-
Jonathan Bryant
- Erik de Castro Lopo
- skaller
-
Jonathan Bryant
-
skaller
- Oliver Bandel
- Brian Hurt
[
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: | Erik de Castro Lopo <mle+ocaml@m...> |
| Subject: | Re: [Caml-list] tail rec |
Jonathan Bryant wrote: > Does the compiler optimize the calls (f x) and (g x) into tail > calls? If so, how would the > > let railrec f x = ... > let tailrec g x = ... > let tailrec h x = ... > > syntax handle/help this? Or would it hinder it? The new syntax neither helps nor hinders. The tailrec directive requests that the compile complain if a function marked as "tailrec" cannot be made tail recursice. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "I have found that Big Design Up Front environments attract people who want to talk about software development, while iterative environments attract people who want to develop software. Is it any surpise that in companies where BDUF is predominant, nobody wants to stoop to coding? Everyone wants to be an 'architect' or a 'Business Analyst' or a 'Product Manager'." -- Reg Braithwaite