Hacker News new | past | comments | ask | show | jobs | submit login

That brings to mind one common computer scientest fallacy - that elegence is an end to itself. It may share some properties which make it practical but unfortunately it is not in practice.

Recursive solutions are more elegant but you still use a stack and while loop to not smash the stack.




Scheme is properly tail-recursive and has been around since 1975. Most (all?) Common Lisp implementations have proper tail recursion. Clojure has tail call optimization for simple cases and only if you explicitly ask for it, but it gets you most of the way there most of the time.

So there are reasons to prefer more imperative languages and their systems, but stack-smashing isn't one of them.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: