by 1021203121 · 10y ago · 0 comments
Recursion is likely to expose bugs in the calling convention if you're writing your first compiler.
If I give you a list of requirements for a programming language that I want you to implement and it includes 'a function must be able to call any function' then you have recursion. You don't need additional separate requirement for 'and that function may be itself', as long as you've fully implemented the first requirement. In fact you'd need an extra requirement to prevent recursion, not to allow it.
That's what I mean by you shouldn't need to consider recursion as a special case.
The fact it is not an additional requirement to allow recursion is irrealevent, what matter is that its extra complexity to handle that case correctly.