Posted: 21st Jan 2011 11:02
This is another topic that has been brought. What are peoples thoughts on this? In favour or not?
Posted: 21st Jan 2011 11:07
Not +1

I like the option of having commands in lowercase or uppercase, often I add experimental or temporary code in uppercase so I can find it easily.
Posted: 21st Jan 2011 11:31
Not +1

For the same reasons as Van B.

I also like to have all my variables in uppercase so that when I want to Ctrl+R (Replace) the name of one, I can set it to match case and change the case for all the variables and not ordinary words or things in comments.


EDIT:
After careful consideration I've changed my mind to "I don't mind".
Posted: 21st Jan 2011 11:39
Not +1

Changing my mind about a lot of these questions the more I think about it.

C0wbox and VanB give two very good reasons why not. I personally think it makes it less likely to make mistakes / replicated variables but if the IDE is like Visual Studio and variables needed to be declared then this wouldn't be as much as a problem...
Posted: 21st Jan 2011 11:49
I've briefly used Java as well as C++ and Java kicked up a hell of a lot more fuss about case sensitivity. It put me off the language (same with the rest of the people in the room trying it) so I feel it may have the same effect if it were done to AGK.
Posted: 21st Jan 2011 12:17
Another vote for NOT case sensitive

I like the option of having commands in lowercase or uppercase


I couldn't agree more
Posted: 21st Jan 2011 12:20
Yes +1.

With all commands cased like LoadImage.

I find the arguments against sensitivity unconvincing - and case insensitivity encourages very sloppy unreadable code such as

+ Code Snippet
myVariable as float
myvariable = 2
inc MYvariable


Are we dealing with three variables or one? When I read code like that I'm never sure what's intended.

Some of the arguments suggested above have nothing to do with case insensitivity. For example you can have all your variables upper or lower or mixed as long as you are consistent, i.e. the above snippet is perfectly acceptable if your intention really is to have three distinct variables.

Why on earth would anyone need to use MYvariable in one place and myVariable somewhere else for the same variable? Sloppy habits should be actively discouraged.
Posted: 21st Jan 2011 12:21
A definite no from me!
Posted: 21st Jan 2011 13:31
I can work with either, but I have to note that DBPro is the only one that is actually case-insensitive, and being so makes it no easier or harder than the other languages I use.

If the IDE autocorrects the case, then I'll happily go with a case-insensitive compiler. Otherwise, I'd prefer it to be case-sensitive.

Another option is both - have it as an in-source compiler mode switch.

[edit]Actually, if you count SQL then I use two.
Posted: 21st Jan 2011 14:09
I agree with what Green Gandalf has said to the letter, though I personally don't mind either way. As long as you know how to type, and your IDE has auto-complete then it's pretty hard to get the case or spelling wrong.


If the IDE autocorrects the case, then I'll happily go with a case-insensitive compiler.


I'm not sure I understand, surely if the IDE auto-corrected the case then there would be no need for the compiler to be case-insensitive?
Posted: 21st Jan 2011 14:29
You're right, with what I've written, but I meant if the case correction was a user-selected option within the IDE.
Posted: 21st Jan 2011 14:40
"


Case insensitive for sure.

And IDE options for selecting case would be awesome!

I like to have my commands in all caps, and variables all lowercase, how Qbasic used to be
Posted: 21st Jan 2011 15:38
I'd say Case-insensitive, but have a feature in the editor to automatically correct case in variables if they have already been declared earlier in the file.
Posted: 21st Jan 2011 15:44
Yeah, an autofill would make all the difference. We're talking about 2 different things though really, case sensitivity on commands, and case sensitivity on variables. I'm sticking to my guns anyway - with autofill the commands would be formatted anyway, and with variables I would hope that Myvar, MYvar, and MYVAR were all the same thing.
Posted: 21st Jan 2011 15:50
Case-insensitive
Posted: 21st Jan 2011 21:54
I agree with green gandalf.
It will make for extremely untidy programming.
So sensitive.
Posted: 21st Jan 2011 22:33
Sounds like the solution is a case insensitive compiler and an editor which can optionally correct case when writing the code in order to produce a standard 'suggested' flavour. By this I mean you can type in any case you like, i.e.

DIM ( lee[100] )
Lee[12] = 999
print ( LEE[12] )
WAITKEY()

And as you finish each line, if the editor is defined, it will auto-correct to look like:

Dim ( lee[100] )
lee[12] = 999
Print ( lee[12] )
WaitKey()

Both would compile fine, but the later looks nicer and easier for someone else to read. I have assumed the editor style is set for capital letters for commands and lower case for variables. The editor would also syntax highlight in a favourable colour too so we get the best chance of quickly reading code from other programmers.
Posted: 21st Jan 2011 22:51
I could live with that.

However it took me a long time to realise that DBPro was case insensitive. I only realised it was when I had a lot of trouble debugging a program in which I had deliberately used variables like "ii" and "II" to mean different integers.

Case sensitivity would have stopped that. And I see absolutely no reason other than sheer sloppiness or laziness for code to resemble your first snippet.
Posted: 21st Jan 2011 22:56
Good point GG! There will be a compiler flag which ensures that all variables are pre-declared before the application can run, so the 'ii' vs 'II' scenario would be detected and reported before you enter the two hour world of aimless wondering in the land of debug.
Posted: 21st Jan 2011 22:59
Good.