There are no such plans for gc (6g, 5g, 8g).
Personally, I find meaningful stack traces helpful more
often than I find myself using unbounded tail recursions.
I have on other projects used gcc -fno-optimize-sibling-calls
precisely to make stack traces more useful.
I think it's very unlikely that the language would require it.
Go is not Scheme.
Russ
Russ just confirmed that what Ian said in that old thread still
applies. There's nothing stopping a compiler from implementing tail
call optimization; it's just that the programmer shouldn't count on it
when writing code because it's not required by the spec. It doesn't
sound like that will change, either.
- Evan
There are no such plans for gc (6g, 5g, 8g).
Personally, I find meaningful stack traces helpful more
often than I find myself using unbounded tail recursions.
I have on other projects used gcc -fno-optimize-sibling-calls
precisely to make stack traces more useful.
If I'm assuming/relying on tail-call optimisation in my coding, then
turning it off "for debugging" will likely make my program crash
demanding more stack frames.
We all have our choices: I'd rather have guaranteed TCO than full
stack-frames for debugging, but I don't think it's unreasonable for
someone else to have the opposite preference.
Chris
--
Chris "allusive" Dollin
That option already exists as -N.
- Evan
I found Newsqueak's become statement a nice fit for TCO in an
imperative setting.
func sum(a, b uint) uint {
if a == 0 {
return b
}
become sum(a-1, b+1)
}
Eoghan