SuperStrict - variable names

BlitzMax Forums/BlitzMax Beginners Area/SuperStrict - variable names

Scott Shaver(Posted 2006) [#1]
I thought SuperStrict would force variable names to be case sensitive, is that wrong? If not, it doesn't appear to work.


deps(Posted 2006) [#2]
superstrict doesn't force variable names to be case sensitive. But I wish it would.


Perturbatio(Posted 2006) [#3]
superstrict doesn't force variable names to be case sensitive. But I wish it would.


Stop before those worms get all over the place please.


grable(Posted 2006) [#4]
PLEASE NO!!! .. dont mess with my SuperStrict! if i wanted to have case sensetivity ide use C/C++/Java ..


Chris C(Posted 2006) [#5]
seconded leave superstrict alone!!!


Dreamora(Posted 2006) [#6]
Case sensitive force wouldn't be of much use.
The compiler is not case sensitive so even if your vars are, for the compiler Test and test would be the same.


FlameDuck(Posted 2006) [#7]
seconded leave superstrict alone!!!
You're right. We need an extra command, maybe SuperExtraStrict mode, that allows for case sensitivity aswell.

Case sensitive force wouldn't be of much use.
Except for readability and maintainability.


Chris C(Posted 2006) [#8]
the easiest way to keep everyone happy on this one is for the ide to have an option to autocapitlise var names

basically capitlise them the same as their defining statement...


Koriolis(Posted 2006) [#9]
Except for readability and maintainability.
I highly disagree. How does it help readability really? With case insensitive identifiers you can still always use the same capitalization, don't you? And at least you know you'll never have some 3rd party library pollute your namespace with an identifier like 'Foo' when you're using another called 'foo'. I'd call THAT a maintenance nightmare.

Please leave the case insensitivity. Or someone give us some real benefit of case sensitivity.


CS_TBL(Posted 2006) [#10]
I kinda liked how things were in QBasic.. all auto-capitalised..


kfprimm(Posted 2006) [#11]
how about a command called SetCompilerMode(flags) and the have flags for it can be like MODE_CASESENSITIVE or MODE_STRICT or MODE_SUPERSTRICT.


Koriolis(Posted 2006) [#12]
You're not seriously asking to have the compiled program tell to the compiler how it *should have* compiled it in the first place? Interesting. Hey marty, where's the dolorean by the way?


Robert Cummings(Posted 2006) [#13]
What I want from case sensitivity is NOT multiple variables with different cases.

It is merely an enforcement - it throws an error simply if yourVar <> YourVar.

It is undesirable to have the compiler allow for differently capitalised variables, but it is desirable for the compiler to warn me if my typing is super sloppy.


Koriolis(Posted 2006) [#14]
What I want from case sensitivity is NOT multiple variables with different cases.
Of course not, this is not something you're actively looking for unless you really love trouble.
But why is it so undesirable not to enforce different capitalizations? A warning could certainly be handy if you really want to enforce a consistant capitalization throughout your files. On the other hand an error seems too much for me. As another reason, I like the fact that capitalization only matters in readability. Using the same capitalization convention in a given project is a plus regarding readability. Given that I can't force 3rd party libraries authors to use the same convention as me, case insenstivity is the only way to really have a single capitalization convention even when using other people's code.

In the end it's not like it matters that much but really if there is an annoyance somwhere I see it in the case sensitivity.
I think a poll on users personal preference would be interesting.


Chris C(Posted 2006) [#15]
the keyboard is a major bottle neck as it is, why make it more of a barrier, why not let the computer do somthing useful while its waiting for you to hit the next key. i.e. ensuring that your "sloppy" typing is corrected as its typed.

I'd be quickly anoyed by having to click compile, cancel a dialog, and change the case of a single character 4 or 5 times every time I added a chunk of code...


Perturbatio(Posted 2006) [#16]
Personally, having used case sensitive languages like javascript, I find it annoying to have to correct my code because I typed something like:
document.getElementByID['myelement'].visibility = 'hidden';
instead of:
document.getElementById['myelement'].visibility = 'hidden';



Dreamora(Posted 2006) [#17]
it is especially annoying when you import modules or packages like in java because you need to know their casing sheme as well (with all the BM users and their unconsistent naming style this would be a horror in perfection)


FlameDuck(Posted 2006) [#18]
it is especially annoying when you import modules or packages like in java because you need to know their casing sheme as well
Except you don't, because any half decent editor will make suggestions for you, and Java has naming conventions.


Curtastic(Posted 2006) [#19]
I really want the IDE to capitalize my variables according to how I defined them. Like VB. At least capitalize my user made function calls like normal functions