Skip to content

Comment on Curious C++ Lambda Examples: Recursion, constexpr, Containers C++23 includedparent

Comments

Very hard to relate to this perspective. Recursion is extremely useful. It definitely has practical utility, and even in many cases where one shouldn't use recursion in actual code (perhaps because it would risk blowing the stack), it's often much easier to first develop a recursive algorithm and then afterwards create an iterative implementation.

As for linked lists, obviously it's true that the cases where they should be used are much more limited than they used to be. But still, they're a very simple data structure that's easy to reason about and which software engineers are very likely to occasionally encounter in practice. I don't think there's much to be gained by eliminating them from students' education.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.