Hacker News new | ask | show | jobs
by overgard 2461 days ago
You lost me at "next thing you know in our production code we started getting these weird ass recursive functions...". I don't mean to be mean, but recursion is pretty fundamental to a lot of algorithms, and it sounds like the SICP coder was just writing stuff more advanced than you were comfortable with.
3 comments

Anything that is more advanced than necessary is too advanced to be comfortable with.
think you kind of missed what I was saying, I was the one recommending, having already done a bunch of functional programming, and thought SICP was a nice intro ( at the time ) to functional programming. But they didn't quite get it and their code was a weird mish mash of OO and weird uses of recursion with badly thought out (stateful ) functions.
Might also be an inappropriate application of recursion in a language where loops are more common. I've seen people who learn new stuff go overboard with clever code in production that is less readable for their peers.

Recursion shouldn't even be considered advanced though, just like classes and first class functions. I'm all for making code as boring as possible, but to me understanding at least these concepts is a requirement of entering the profession of software development.

Sometimes recursion is the good solution, For example a back-tracking solution is more simple with recursion than without it.