"Andrew Godfrey" <[email protected]> wrote: > 1) A function annotation that means "I will call myself > recursively, and when I do, I expect the tail recursion > optimization." I have seen code which allocates something big on > the stack and depends on the optimization. So this intent should > be expressible.
Wouldn't it be more useful to have a modified/annotated return statement for that? Tail-recursiveness is an implementation detail, for the user of the function it's not really interesting. Except for the fact that it has bounded stack size which is a useful property by itself and not only for tailrecursive functions. Tobi
