Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> There's no TCO in the C standard. That doesn't make tail-recursive C programs any less correct.


They're not incorrect, but that's mostly because the C standard also allows you to assume an infinite stack, so recursive programs that ask for absurd stack depths don't violate the standard with or without TCO. But if in practice the program only runs successfully when compiled on a compiler with TCO, it's not very portable, in that it relies on non-guaranteed compiler features for it to actually work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: