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

Still hoping we'll eventually stop using Fibonacci to show off recursion, because that's one of those examples where the maths might be expressed as recursive relation, but the implementation should never be =)

Good AI would go "you don't want that, that's horribly inefficient. Here's an actually performant implementation based on the closed-form expression".



Nah, good AI would run in the compiler and optimize the recursion into something fast.


What is your preferred example for teaching a beginner to use recursion?




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

Search: