3 ms·
> I don't think the 'stops buggy programs' argument is particularly compelling, since that could apply to pretty much any restriction This is the part that irk
by ufo 6y ago
> I don't think the 'stops buggy programs' argument is particularly compelling, since that could apply to pretty much any restriction
This is the part that irks me the most. If I have an algorithm that is neatly written as a recursive algorithm and mechanically rewrite it to use an explicit stack, that doesn't change the fact that an infinite loop is still a bug. It's just that it's going to manifest as the process using all the available RAM instead of as a stack overflow.
> yet they're somehow fine with inheriting these weird restrictions from C & co.?
Sometimes that's because the interpreter itself uses recursion. That can be convenient for whoever is implementing the interpreter, at the cost of inheriting the stack limit from C.
That said, there are also languages that enforce a recursion limit even when they don't use the C stack at all. In which case I ask the exact same question as you do.