4 ms·
In plenty of environments, there's a very limited number of calls you can make before the program fails entirely. For instance, in GW-BASIC, your namesake, the
by recursive 5y ago
In plenty of environments, there's a very limited number of calls you can make before the program fails entirely. For instance, in GW-BASIC, your namesake, the limit is less than 100 calls. There are plenty of real useful production langauges where your stack will run out before 1000 frames of depth.
But on the other hand, it's quite reasonable to write a state machine which is expected to make [mb]illions of state transitions.
Crash vs not-crash is not a micro-optimization.
- gwbas1c 5y agoOh you're bringing back memories of childhood. When I wrote in GW-Basic, I only used gotos. Most of the example code that I had access to used gotos. I was 11 years old at the time. > There are plenty of real useful production langauges where your stack will run out before 1000 frames of depth That wouldn't surprise me in an embedded environment. But if that's the case for a run of the mill general purpose programming language that's running a typical web application, I'd be shocked.
- Jtsummers 5y ago> But if that's the case for a run of the mill general purpose programming language that's running a typical web application, I'd be shocked. Python's default recursion limit is 1000.