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

I've written about this before, but suggesting recursion for tree traversal is equivalent to suggesting goto is a replacement for if/for/while.

We don't have syntax and semantics for recursion schemes in any programming language - it's always deferred to library support at best. As far as I'm concerned, this is an open problem in programing language design where we finally replace the vestigial recursion hack with a proper structured programming solution.



Well, recursion is well-structured and can be reasoned about through induction. Goto is unstructured…




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

Search: