[Implemented] Again on OPTION EXPLICIT

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

[Implemented] Again on OPTION EXPLICIT

Post by luis »

I read about many people who are asking for that, and I can only add my voice to the choir.

I can live with any other PB shortcoming (not meant to be a criticism, any language has some) and with its amazing features too :wink: but the automatic declaration of the variable for any project of moderate complexity is really a pain in the *BEEP*.

Not only when writing the code initially, but when editing it later also.
In the last past days, while trying out PB, any time I swapped some part of code or reorganized a bunch of procedures I lost HALF of the time in moving around Protected variables and checking I haven't left some useless declaration where the variable no longer exist.

Add to this the obvious bugs when you mistype a variable, and that can be quite frustrating.

I really CANNOT use variables on the spot without declaring them and see them growing wild, losing control of them, a lot duplicated, mistyped, unused .... I feel bad only thinking of it.

I believe the PB team is working on that

viewtopic.php?t=15005

and I really hope so because this could be the only thing stopping me to use PB

Thank you for the attention (?) !
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Yep, this isnt a scripting language so declaring variables explicitly would be nice
Jellybean
User
User
Posts: 95
Joined: Wed Aug 24, 2005 7:33 pm

Post by Jellybean »

I would like the behaviour of OPTION EXPLICIT, but I would like $TYPECHECK ON | OFF (Rapid-Q syntax/keywords) instead of the VB syntax/keywords.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Please continue the discussion in the other thread linked above.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Locked