Explicit None

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,

I have to beg again for the "Explicit" compiler option.

I just spent an hour debugging a problem because I typed "gsme" instead of "game".

<Soapbox>
Automatically creating variables has no place in a modern software language. It may be cutesy when you're writing a tiny program and you need to create variables like iii and jjj on the fly - we used to do this in Fortran back in the 80's. But, when you are writing a serious program, the possibility of a typo creating an impossible to find error is just too great. Everything should be explicitly defined.

In the 80's I spent an entire day with a Program Manager tweaking parameters on an application only to find out that some floating-point parameter was undeclared and assumed by the compiler to be an integer making the parameter set entirely worthless.
</Soapbox>

B4A is fantastic except for this one feature of Basic.

Thanks,
Barry.
 
Last edited:

nacnud

Member
Licensed User
Longtime User
I'm not sure that I'd share the same passion for the concept, but in all grown up languages there is the idea of Option Explicit. Sure, not in scripting languages, but as I said...I know it's powerful...but it really is a typo-heaven. I know we can auto-complete...but still...

So yeah, it gets my vote

Option Explicit / check box / by default / compiler switch / whatever....

2 cents; done.
 
Upvote 0
Top