User loginNavigation |
Loop and recursionGeneric loops are problematic to reason about and understand when you read the code, and therefore prone to cause bugs. I think it would be beneficial to forbid generic loops, and only have iterators. Recursions can also be problematic since the stack usage can become unpredictable. The exception is of course tail recursions, since those can re-use that current stack frame. If the language would prohibit generic loops and recursions except for tail recursions, would it still be useful as a generic programming language or would those restrictions make some common designs impossible? By Mats at 2021-01-06 09:24 | LtU Forum | previous forum topic | next forum topic | other blogs | 1449 reads
|
Browse archivesActive forum topics |
Recent comments
11 hours 4 min ago
21 hours 46 min ago
1 day 5 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 10 hours ago
1 day 16 hours ago
1 day 19 hours ago