Tenaja wrote:This feature is no different--nor any more (or less) likely to lead to errors--than using the DEFAULT setting of DisableExplicit. Anyone who argues this feature should not be implemented may as well also argue that DisableExplicit be removed with EnableExplicit be turned on by default. So your statement is only true with old code, and with coders using habits accepted in the industry as "bad programming practices". Most compilers will not guarantee a value; PB has a safe mode, which is nice for beginners. However, most programmers who are active on this board are not beginners, and therefore have the skills to benefit from this feature request.
I agree about what you say regarding DisableExplicit and "bad programming practices", but this has been historically that way for PureBasic. EnableExplicit didnt even exist when i started with PureBasic. This "bad programming practice" behaviour by default, is just one of the 'historic' flaws of PB to me, that most programming languages have. Changing this default in a new version, would likely break backward compatibility to a lot programs.
Tenaja wrote:Most compilers will not guarantee a value; PB has a safe mode, which is nice for beginners. However, most programmers who are active on this board are not beginners, and therefore have the skills to benefit from this feature request.
Advanced programmers can already avoid this "limitation" in different ways. Argueing for this compiler change, seems a bit misguided to me tbh. because personally i would just write a function with the parameters you mentioned, in hand optimized assembler and link/include it into PureBasic software. Even if you can't write assembler code, you could rewrite your recursive solution and use GOTO/GOSUB to avoid the stack "humping" and variable initialisation of a recursive solution.
Excessive recursive solutions can be dangerous anyway, because the program/thread stack frame doesnt always dynamically grow. I just tried 250.000 recursive calls for a PB function with 2 parameters and a 32-bit executable still crashes with a stack overflow in Win7.