Slashdot Mirror


Who Needs Case-Sensitivity in Java?

David Barber asks: "I've just started learning Java, and to my exceptional disappointment it is as case-sensitive as C. I'd like to ask Slashdot readers to make the case for case-sensitivity in a programming language, because I can't see it. Although I've used C on and off since 1976, I also have a history of Fortran, COBOL, PL/I, assembler, and other legacy languages that were never case sensitive (perhaps due to the single case nature of card punches). Today I use modern languages including Visual Basic which preserves case for pleasing appearance, but is not case-sensitive itself (it will correct the case for you in the IDE, which is quite nice). In all my years of programming I have never seen the rationale for making a programming language case sensitive. It simply makes typing it in harder, and mistakes easier, yet we persevere with maintaining it in modern languages like Java. Without making this into a religious war, can someone make the argument of why case-sensitivity in a language is 'a good thing'? And don't confuse this with handling case-sensitive data, which is fine."

434 comments

  1. I was thinking the same thing... by mOoZik · · Score: 0, Funny

    ..and I agree. It is a major annoyance for me, as well.

    1. Re:I was thinking the same thing... by n9hmg · · Score: 2, Informative

      Ok, here's the solution for all the case-challenged intellects out there, who can't seem to grasp that the ability to use both cases does not imply the requirement to do so:
      Program with the capslock key on. Occasionally run your code through "tr 'a-z' 'A-Z' and diff that against your existing file, to resolve conflicts. Fix the translated file and work from that, and quit complaining about the fact that a language has features you don't use. There're plenty of languages that were developed on baudot teletypes, so use one of them, if it's such a hardship.
      We're using numbers to represent letters, and the only thing relating an uppercase character to its lowercase counterpart is the ascii translation table. If someone is using a DBCS input method for variable names, do you really think the compiler should anglicize the bytes? Or, perhaps you'd like the extra complexity of having to specify localization? Sure, it can be done, but why write around the preferences of fools?

    2. Re:I was thinking the same thing... by Shaleh · · Score: 1

      One of the issues here is Java's coding standards. They want you to use:

      myCoolMethod()

      instead of the C norm:

      my_cool_method()

      so you have to remember which word is capitalized. Not that I find this to be any real problem in languages like C++ or Python where there are similar conventions. (I am not a Java hacker)

    3. Re:I was thinking the same thing... by Frizzle+Fry · · Score: 2, Informative
      so you have to remember which word is capitalized

      No you don't. The coding standards say that initial letters are capitalized for all words except the first. If you know that rule, there is nothing to remember for each function name. Unless of course, you're not following the coding standard, but I imagine that you are since your gripe is with that standard.
      --
      I'd rather be lucky than good.
    4. Re:I was thinking the same thing... by Haeleth · · Score: 1

      The coding standards say that initial letters are capitalized for all words except the first. If you know that rule, there is nothing to remember for each function name. Unless of course, you're not following the coding standard, but I imagine that you are since your gripe is with that standard.

      Great.

      So tell me - should the word for the name of a file be capitalised as Filename or FileName?

      Answer - it depends on the function!

      Both forms appear in the Java standard library (java.io.FilenameFilter, java.net.FileNameMap). I guess coding standards don't make things quite as simple as you like to believe.

  2. Uniformity... by samdu · · Score: 2, Funny

    I'm not a programmer, but I would imagine that case-sensitivity would help a great deal with the uniformity of the code.

    1. Re:Uniformity... by samjam · · Score: 0, Offtopic

      I'm not a member of "team amiga" and I don't drink coffee but I imagine compulsory coffee during team amiga discussions would help keep the discussions on track.

    2. Re:Uniformity... by Anonymous Coward · · Score: 0

      You can have my coffee when you clean it off my dead keyboard and monitor, cause that shit was funny.

    3. Re:Uniformity... by mystran · · Score: 3, Insightful
      I am a programmer, and I can tell that case-sensitivity has other benefits too.

      • You don't need to care about the LOCALE settings or other such things. Either something is the same as something else, or it is not. You don't need to care if the compiler actually accepts the source with the right character set.
      • In some cases, it is very useful to be able to use the same identifier in several different cases. One example is having a class "Foobar", an instance of which you can name "foobar", and it's clear what class it belongs, but you still have a separate identifier.
      • This is not directly related to Java, but sometimes you want to have a short identifier for something that's used a lot. Say, you have a global object which talks to an Xserver. If you need to use that in many places, it's nice to name it "X" which is easy to understand, but "x" is a common variable name for short-lived variables, and you don't want it to be the same identifier as "X". Without case-sensitivity, you can't really use one letter globals, because one letter variables are the ones people will be using the most. With case-sensitivy, you can use just the uppercase for globals, and there's no problem. (whether globals are a good idea at all is another subject, and depends on the language and type of program one is writing in/for)

      Case-insensitivity is probably the single most annoying thing with otherwise decent languages such as Scheme. In case-sensitive languages, errors in casing are usually catched by a compiler. With case-insensitive languages it's easy to make errors that are not catched, because the different looking identifiers are actually the same.

      My .02 euros. YMMV.

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    4. Re:Uniformity... by Spudley · · Score: 2, Interesting

      Your first point is by far the most important point that you made. Character sets are not uniform (at least in the world of 8 bits per character), even among nations that share most of them, and the upper/lower case equivalents are not always the same between them.

      I also agree with your final point - case sensitivity can be useful in helping to pick up typing errors at compile time.

      But as for the two other points you made...

      The second point is not *quite* as strong. You're right that it does enable you to use similar names in the way you describe, but I have to dispute the need to do that - I hope you comment your code well, because you're certainly not making it any easier to read with that sort of naming scheme.

      And as for the third point... Hmph. If I ever catch anyone using a single-character variable name...! Grrrr. Don't do it. There's absolutely never ever any possible excuse for it (unless you are deliberately obfuscating your code). At least call it "counter" or something similar if you can't come up with anything better.

      Another good point (that has been made elsewhere, I think) is that case sensitivity is a way of trying to enforce consistency in your naming schemes, to benefit programmers reading each others' code - they will know, for example, that all upper case names are declared in the code as static, whereas if it case sensitivity isn't enforced you may type a name in a different case in different places, leaving it unclear to the reader how it's declared without checking back to the header.

      --
      (Spudley Strikes Again!)
    5. Re:Uniformity... by mystran · · Score: 2, Insightful
      Ok, the "X" example might be a bad one (and indeed I generally dislike identifiers that are two short to be descriptive, although in the particular case I had this, an uppercase X could not have possibly meant anything else but the Xserver interfacing object, and it was used extensively, which was actually the fault of the stupid interface, which I had nothing to say about anyway) but at least local one-letter variables are IMHO just fine in many places (that is not the same as "in most places" though). There are valid reasons to call something counter, but no professional programmer would have any trouble reading code where you have say, two coordinates, named "x" and "y" and an iteration variable "i" to iterate over an array.

      I agree that one should think carefully before using short variables, but there are a lot of cases where using longer ones just doesn't make sense. Concrete (although trivial) example (in Scheme):

      (define (pow2 x) (* x x))

      There is simply no reason why this simple function would need a longer variable name than "x". The question is, can I use short variable names, and still write code that others can understand, or should I opt for longer names just for the sake of readability. For a function shorter than say, 5 lines, anybody can read it independent of the length of variable names (as long as you don't deliberately try to fill the lines ofcourse). In fact, it might well be harder to read, were longer names used, because the overall code would be longer. (In Java it often happens that you have to cut a single function call to multiple lines simply because you have to deal with extensively long identifier names. Ofcourse "import" can solve part of this, but then the reader of the code has to know what's imported if you ever have two classes with the same basename, which again is often impossible to prevent, even with base J2SDK.)

      I agree though, that "Foobar" and "foobar" could just as well be made something like "foobar" and "foobar_obj" or what ever naming convention one happens to prefer. Experience has shown that a lot of people seem to like the "turn the first character to lower-case" convention.

      PS. I realize perfectly well that the larger your codebase, and the more you have people working on it, the more descriptive names you need.

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    6. Re:Uniformity... by Frizzle+Fry · · Score: 1
      Hmph. If I ever catch anyone using a single-character variable name...! Grrrr. Don't do it. There's absolutely never ever any possible excuse for it (unless you are deliberately obfuscating your code).

      While this is certainly true in general, I think "never ever" is an exagerration. Using i as a counter for small loops is such a common idiom that I think following it makes it faster/ easier for others to read your code.
      --
      I'd rather be lucky than good.
    7. Re:Uniformity... by Anonymous Coward · · Score: 2, Insightful
      Hmph. If I ever catch anyone using a single-character variable name...! Grrrr. Don't do it. There's absolutely never ever any possible excuse for it (unless you are deliberately obfuscating your code).

      What if I'm iterating over the elements in a 2D array--say a bitmap? Should I not use x and y for my counters?

      At least call it "counter" or something similar if you can't come up with anything better.

      Why? Giving temporaries/counters descriptive names makes them look important, when they're generally just a detail. Besides that, in languages like C++ and C99, they're generally declared at the point of their use, so there's no question about what they are doing. Even when they're declared far away, we know that names like i are indices. What does counter tell me that I wouldn't already know?

  3. History by Photar · · Score: 4, Funny

    Case sensitivity is just a tradition, with its roots in the Old Testiment.

    --
    He who knows not and knows he knows not is a wise man. He who knows not and knows not he knows not is a fool.
    1. Re:History by Associate · · Score: 1

      For some reason I think you post needs a Monty Python reply. Wait, I'll go find one.

      --
      Someone hates these cans.
    2. Re:History by saden1 · · Score: 1, Interesting

      Case sensitivity helps with naming convention. Static variables are always capitalized. Plus it doesn't hurt having them so why not?

      The idea of eliminating case sensitivity seems appealing until you need it.

      --

      -----
      One is born into aristocracy, but mediocrity can only be achieved through hard work.
    3. Re:History by hoggoth · · Score: 1

      > Case sensitivity helps with naming convention. Static variables are always capitalized. Plus it doesn't hurt having them so why not?

      He's not arguing that you shouldn't be allowed to use your shift key! You can still capitalize your static variables if you like. His point is it does hurt having case sensitivity in variable names (and objects, functions, etc).

      If you spell a variable "thisIsImportant" in hundreds of places throughout your source code, but in one place spell it "ThisIsImportant" a case sensitive language like Java will consider those two DIFFERENT variables. The authors argument, which I agree with, is that for better compatibility with human beings those should be considered the SAME variable.
      There is no useful case for having those be separate variables. It would be terrible style to use the SAME word with different capitalizations for different variables. Words do not parse, sound, or feel different when they are capitalized differently. They should not be considered different words.
      Of course you can still use any capitalization scheme you feel aids your programs readability, such as static variables in all CAPS and long names with the firsLettersOfWordsCapitalized.

      --
      - For the complete works of Shakespeare: cat /dev/random (may take some time)
    4. Re:History by Mr.+Slippery · · Score: 5, Interesting
      You can still capitalize your static variables if you like...If you spell a variable "thisIsImportant" in hundreds of places throughout your source code, but in one place spell it "ThisIsImportant" a case sensitive language like Java will consider those two DIFFERENT variables.

      It won't be considered a different variable, it will be considered an undeclared variable. The compliler will choke on it.

      As it should. If people use case convertions to convey information - static variables are capitalized - then the compiler enforcing consistent casing is good. Else in file1.c it's "ThisIsStatic", in file2.c it's "thisisstatic"; Alice, looking a file1.c, knows it's static, while Bob, looking at file2.c, doesn't get that same information. The compiler is merely making you pick a way and stick to it, for the benefit of your fellow humans.

      Should the compilier also ignore misspellings? If "Variable1" appears all over the place and in one place "Variabl1" appears, should the complier auto-correct it to "Variable1"?

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    5. Re:History by msuzio · · Score: 5, Insightful

      I couldn't disagree more. If I read DeviceEntity.java, and it says:

      getDeviceName(customerId)

      I for damn sure don't want to search for the same thing in DeviceServlet.java and be frustrated because it says:

      GETDeviceNAME

      ugh. At the most basic level, this is dumb. If I mistyped the name with incorrect capitalization, it *won't compile*! This is not a subtle error, it would be obvious! So it does not at all lead to errors.

      Case sensitivity means I know a variable, method, whatever, is always going to "look" the same to me when I'm scanning the code or when I type a quick search into vi (/getDeviceName). I don't need my new intern who likes a different set of notation littering my code with GetDeviceName because the compiler lets him get away with it :-).

      I'll agree with you that having both ThisIsImportant and thisisimportant in a module and relying on case-insensitivity to differentiate is probably not a good idea, though...

    6. Re:History by saden1 · · Score: 1

      With modern IDE (the beautiful Eclipse IDE) you don't have any of these problems. What you are referring to will always be caught by the compiler as well.

      --

      -----
      One is born into aristocracy, but mediocrity can only be achieved through hard work.
    7. Re:History by Eneff · · Score: 4, Informative

      :set ic is your friend.

      grep -i is your god.

    8. Re:History by Anonymous Coward · · Score: 0

      If people wouldn't use the *ghey* style of retardedCaps, it would't be an issue.

    9. Re:History by jc42 · · Score: 4, Interesting

      Case sensitivity is just a tradition, with its roots in the Old Testiment.

      Um, funny maybe, but wrong. The Old Testament was written in classical Hebrew (with maybe a bit of Aramaic in some of the later parts), and that alphabet has never had a case distinction.

      Upper/lower case is something that developed only around 1500 years ago, plus or minus a few centuries. It was adopted in the Roman, Greek and Cyrillic alphabets, but that's about it.

      It is useful, as we all learned in grade school. Thus, many managers have aids who are very helpful. But if they have AIDS, it's a serious medical problem.

      One of the reasons that the project I'm working on isn't using Macs is that OSX uses a caseless file system. When we tried porting several important software packages to OSX, they were utter disasters. The symptoms were bizarre and inexplicable, and took forever to hunt down. It turned out to be caused by executables from different packages that had names that differed only in capitalization. Each package had its own convention, so there weren't any collisions on linux and other unix-like systems. But on OSX, there were cases where a component of package X ended up calling a program from package Y, and they both went crazy. We spent so much time finding the problems and fixing them that we decided to just not use OSX except as a UI.

      It's too bad, really. My 17" Powerbook is a really neat tool. I'd like to use it as a real computer. It wouldn't have been much more work for Apple to hide their case insensitivity in runtime libraries, the way it should be done. I really wish they'd done that, rather than breaking the assumptions that all other unix-like systems are built on.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    10. Re:History by Anonymous Coward · · Score: 0

      Isn't it possible to install linux on your 17" Powerbook and retain the aqua GUI?
      Or is that urban legend? I myself have never done it.

    11. Re:History by JGski · · Score: 3, Insightful
      This sounds too much like the old DOS complaint about the Unix filesystem being case sensitive. Being case-INsensitive would be a far greater flaw.

      For heaven's sake, if you mispelled on case in a program, 99% of the time you'll pick it up in the first compile - problem solved!! Sounds like poor programming discipline and laziness more than anything else.

    12. Re:History by ShaggyBOFH · · Score: 1
      Yes, that's a new feature in OfficeC++2005.

      ----

      --
      --- Just say no to negativity.
    13. Re:History by drgnvale · · Score: 2, Funny

      Yes, that's a new feature in OfficeC++2005. And an old feature of INTERLISP. Do What I Mean must have been an awsome tool.

    14. Re:History by Photar · · Score: 1


      Uh, actually you can turn case sensitivity on in OSX, but you have to format your drive that way.

      And hey, WTF, posting all this about a joke, fsking Karma Whore.

      --
      He who knows not and knows he knows not is a wise man. He who knows not and knows not he knows not is a fool.
    15. Re:History by Suppafly · · Score: 1

      Should the compilier also ignore misspellings? If "Variable1" appears all over the place and in one place "Variabl1" appears, should the complier auto-correct it to "Variable1"?

      That's exactly the way you should think about it, getting hung up on the fact that A and a are the same letter is dumb, in most programming languages A and a are different regardless of the fact that we call them both "aye".

      No one would seriously argue that we should only use the first 13 letters of the alphabet since you don't really need all of those letters to make sense of things, and yet they expect us to take them seriously when they can't keep track of capitolized letters.

    16. Re:History by a1291762 · · Score: 1

      There is a way to add case-sensitivity to Mac OS X. http://homepage.mac.com/lgw4/iblog/C675550648/E871 090033/

      Note the warnings about this though... http://www.macfixit.com/staticpages/index.php?page =2003111009264885

      Link

    17. Re:History by XaosTX · · Score: 1

      Even if your manager has aids and not AIDS, I would be concerned. Now if he has hired some aides or even some young interns, to help him around the office, well, then maybe he is just Bill Clinton.

    18. Re:History by w00t_sargasso · · Score: 1

      Maybe so, provided that Variabl1 hasnt been declared... :P Personally, I like Basic because of it's ease of use. Recently, I have been getting quite attracted to PHP for similar reasons. Once you use it a bit, its dead simple (and not case sensetive!) Case sensetivity is insensible. Personally, why is it in unix...? It's just another mystery the world cannot answer.

    19. Re:History by Mr.+Slippery · · Score: 1
      Personally, I like Basic because of it's ease of use. Recently, I have been getting quite attracted to PHP for similar reasons.

      Please don't use "Basic" when you mean "Visual Basic". You'll pollute my memories of the good old days on my CoCo...
      10 PRINT "TMS RULES!"
      20 GOTO 10

      Anyway, I like PHP fine, it's what I'm paid to hack with these days. (And I'm the one who argued for it over our existing CGI C/C++.) But, PHP variable names are case-sensitive.

      (Which, in a language where variables aren't pre-declared, so such things can't be caught the compiler, may be dangerous:
      $someVar = do_it();
      echo "do_it() returns $somevar"; // bang head against wall wondering why do_it() always returns 0...

      Names of functions, which do need pre-declaration, are case-insensitive. That is ass-backwards.)

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    20. Re:History by jc42 · · Score: 1

      Well, actually he might have both aids and aides. Y'know, like visual aids and such. Though maybe a hearing aid wouldn't be anything to brag about (unless it's a really good one).

      The English language is so wonderfully confused at times.

      It is funny how the image of an intern changed so rapidly.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    21. Re:History by w00t_sargasso · · Score: 1

      "Please don't use "Basic" when you mean "Visual Basic". You'll pollute my memories of the good old days on my CoCo..." When I said Basic, I was not referring to BASIC, but the Beginners All-Purpose Symbolic Instruction Code in general. That is VB, BASIC, hell, even GW-BASIC... "PHP variable names are case-sensitive." Ooops. I tend to do everything not a string lowercase, so I havent even noticed this... but whilest on the topic of PHP, it rules!! :)

    22. Re:History by drsmithy · · Score: 1
      One of the reasons that the project I'm working on isn't using Macs is that OSX uses a caseless file system.

      It's not caseless, it's case insensitive and case preserving. DOS's FAT would be an example of a "caseless" filesystem.

    23. Re:History by eMilkshake · · Score: 1

      Did you try Apples UNIX file system instead of HFS+?

    24. Re:History by Anonymous Coward · · Score: 0

      I call i and I "aye"
      For a and A it should be eh, eh?

    25. Re:History by Anonymous Coward · · Score: 0

      Without knowing for certain, I would say it is probably because the encodings for lower and upper case letters are different in ASCII, and I think in most other character sets.

      UNIX is written in C, where it is not written in assembly. In assembly, different numbers are different, and the machine doesn't care if you, four levels of abstraction away from it, think they are the same letter.

      In C, the char datatype is basically a small integer datatype, so we have the same issue of different numbers being different.

    26. Re:History by ACPosterChild · · Score: 1

      Yes, an undeclared variable that is not the same variable as thisIsImportant. Thus... DIFFERENT!!!

    27. Re:History by Mr.+Slippery · · Score: 1
      Yes, an undeclared variable that is not the same variable as thisIsImportant. Thus... DIFFERENT!!!

      No. When the compiler chokes and dies, you don't have a program. Thus you don't have any variables. "Undeclared variable" is not a type of variable, it is a type of compile time error.

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    28. Re:History by phxhawke · · Score: 1

      For a and A it should be eh, eh?


      BAD! BAD AC! NO COOKIE!
    29. Re:History by Edward+Kmett · · Score: 1

      I keep tripping over case sensitivity issues on OS X myself. Perl LWP installing "HEAD" in /usr/bin for determining last change dates of web pages in /usr/bin and overwriting the classic unix 'head' we all know and love.

      GNU-Crypto falls into an infinite loop due to finding a find (gnu-crypto) when it searches for a virtual set of dependencies (GNU-CRYPTO) in its test setup.

      I've stumbled into and had to fix or abandon dozens of errors of this type.

      Fortunately 10.3 now has the ability to mount case insensitive HFS volumes.

      Guess its time to upgrade.

      --
      Sanity is a sandbox. I prefer the swings.
    30. Re:History by ACPosterChild · · Score: 1

      The comment seemed, if I may borrow a phrase from The Shawshank Redemption, intentionally obtuse.

      What the poster meant (and might not have known it) was that it will be tokenized as a a different token. The compiler chokes because it sees what was MEANT to be a variable, but can't find a reference to its existence. Sure, it never *becomes* a variable because the compile never finishes, but even the compiler know that is *should* be (was meant to be) a variable. Thus, the Undeclared Variable error message.

      But, yes; strickly speaking, a pedantic interpretation would say that a misspelled variable is not a variable at all.

  4. It enforces clean code by choi · · Score: 4, Informative

    It's nice that VB corrects your code in its proprietary IDE, but C/++/Java is used in many different editors/IDEs. The language thus enforces clean code case-wise by being case sensitive.

    --
    Browse Slashdot at Funny+5, everything else -5. The only way to sustain it.
    1. Re:It enforces clean code by ForteTuba · · Score: 2, Insightful

      Must disagree. I can't think of a language that enforces clean code. Can anyone?

    2. Re:It enforces clean code by Anonymous Coward · · Score: 0

      Ada.

    3. Re:It enforces clean code by BigBadDude · · Score: 1


      pascal was designed for this...

    4. Re:It enforces clean code by ForteTuba · · Score: 2, Insightful
      Is thIs clEAn cOdE cAsEwIsE As lOng As It's cOnsIstEnt In All yOUr proGrAm's fIlEs? whAt lAngUAgE wIll hElp wIth thIs? AdA? pAscAl?

      Conventions matter as far as clean code, even at the level of case choices. Language choice doesn't help here, does it?

    5. Re:It enforces clean code by questionlp · · Score: 1

      Python? Well, at least when it comes to indentation of code.

    6. Re:It enforces clean code by Dr.+Smeegee · · Score: 4, Funny

      Python strongly encourages it. :-)

      Perhaps syntax errors should cause your monitor to explode. I think using deprecated modules already does.

      Let me check....

      Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on Your Mom
      Type "copyright", "credits" or "license" for more information.
      IDLE 0.8 -- press F1 for help
      >>> import fcntl B`LAST!!!!

      AAAIIIGH! Mine EYES!

      Aye.

    7. Re:It enforces clean code by Glonoinha · · Score: 1

      I have to disagree. I have written some pretty demented, borderline evil code in Pascal.

      All Pascal demands is that you define things before you use them, you end each statement in a semicolon, and that the program have a Begin and an End.

      --
      Glonoinha the MebiByte Slayer
    8. Re:It enforces clean code by Ryosen · · Score: 1

      COBOL? ALL UPPER CASE AND ALL IN THE SAME COLUMNS. ;)

      RPG is also very easy to read in that it is columnar, too.

      Nothing, of course, "enforces" clean code. But that also depends on your definition of just what "clean" is.

      --

      Ryosen
      One man's "Troll, +1" is another man's "Insightful, +1".
    9. Re:It enforces clean code by llefler · · Score: 1

      Cobol doesn't require all upper case. Most likely it was just your terminals. And the column restrictions are small. Not any worse than 360 assembly. And not any worse than the code indenting you should be doing with most other languages.

      RPG easy to read? In what universe? I'll bet you like those obfuscated perl contests too.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    10. Re:It enforces clean code by DAldredge · · Score: 1

      Perl.

    11. Re:It enforces clean code by Ryosen · · Score: 1

      Hmmm....a little background is required.

      I'm old. There. I said it.

      I started working with COBOL in the mid-80's. When I moved to RPG II/III in 90 (around the same time as the introduction of RPG/400), I was estatic to get out of COBOL. Depending on the system and compiler, as well as the naming conventions in place, COBOL development can require all captitals. As I remember working on the Tandem VLX systems, there were columnar restructions as well.

      RPG is actually quite easy to read once you get used to it. At least, RPG III is. RPG II, with its loop controls and indicators, was a bit more cryptic. I'm going waaaay back now so I may not be remembering the terminology correctly.

      Of course, I started out in 6510 Assembler, so, to me at least, anything is easier to read.

      --

      Ryosen
      One man's "Troll, +1" is another man's "Insightful, +1".
    12. Re:It enforces clean code by jnana · · Score: 1

      Yes, it just has an extremely unusual conception of 'clean', much as the hackers who favor Perl.

    13. Re:It enforces clean code by alonsoac · · Score: 1

      I don't see what you mean by clean code. If you meant that having the same case in all parts of the program makes it cleaner, I'm not sure that's true and in any case I'm not sure the language should care about that.

    14. Re:It enforces clean code by DAldredge · · Score: 1

      Perl...

    15. Re:It enforces clean code by w00t_sargasso · · Score: 1

      In other words, code that is non-standards based. You have to enforce rules, otherwise nobody knows what they are doing. the rules enforced by VB clean the code up. You don't need to use that "proprietary" ide (although it helps) And anyhow, why the condescending tone? :D

    16. Re:It enforces clean code by llefler · · Score: 1

      Don't be using the 'O' word.

      I'm sorry to say that I was introduced to Cobol in 1981 on punched cards. (IBM 4331) Columns were the least of our worries. :-) I did my first real RPG (II) work in 1985 on a system 34. And then Cobol again in the early 90s on the PC with Microfocus.

      BTW, Cobol does have some columnar restrictions. Since it's based on cards, lines can't go past column 72 (or is that 71...) Procedures and other bits start in column 1. The meat of the program has to start in column 5. Although there appears to be a compiler directive now SOURCEFORMAT"FREE" that relaxes them. Anyway, TMI. Rules that are happily forgotton.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    17. Re:It enforces clean code by ads.osdn.com.blocked · · Score: 0

      You can't "enforce" clean code as much as you can't enforce clean design, or enforce a bad programmer to be a good one. Just as much as you can't enforce the way people speak English.

      But convention and guidelines are important, and if you are to become a reasonably abled Java programmer, avoiding these conventions will simply make it harder on you, not easier. Which is what the original yet naive (flamebait) post was all about. I say flambait because discussing it is futile. It isnt going to change, no matter what any script kiddie who can't get his HellWorld applet to compile says.

      --

      public final transient String president = DUBYA;
    18. Re:It enforces clean code by mge · · Score: 1

      BTW, Cobol does have some columnar restrictions. Since it's based on cards, lines can't go past column 72 (or is that 71...) Procedures and other bits start in column 1.

      Column 1-6 sequence numbering
      column 7 - place an asterisk for a comment
      column 8-11 - labels and identifications (i.e PROCEDURE DIVISION would start in column 8). Also in DATA DIVISION, this was where you had your 01 and 77 for data definitions and switches.
      column 12-71 procedural statements, field names etc.
      column 72 - continuation marker
      column 73 - 80 sequence control

      CAVEAT: my last cobol programming was over 15 years ago

  5. my reasons....... by Anonymous Coward · · Score: 5, Insightful

    Here are some reasons I just made up (though a couple actually affected my programming).

    Because it makes sense that all symbols are uniquely identified from a set of characters, rather than each symbol being identified by a huge set of names (var, vaR, vAr, vAR, etc). There may be a need for a "canonical name", which is it? All lowercase? All uppercase?

    Because it makes dynamic programming and reflection even slower and/or more error-prone (I have experienced this in PHP which is case-insensitive and it bugged the hell out of me [and my program]).

    Because it takes fewer CPU cycles when compiling or scanning source code.

    Because some languages use case to indicate a different class of variable (Ruby for instance, issues a warning if you try and change a variable starting with uppercase).

    Because many programmer's text editors are case-sensitive (I know, I know, chicken, egg, etc).

    Because lowercase/uppercase could be a harder problem if you use a language which allows Unicode symbols (Perl6?). (Is this possible? I have no idea).

    Because sometimes it actually is useful to have a symbol "ID" and another one "id" in the same symbol table.

    Because stuff like case and english language is not part of programming, programming is about precision and computers. Introducing ambiguity (whether for the compiler or the programmer) can't be good.

    Because C is case-sensitive, and C is a popular language.

    You might want to try PHP5 though, it's a lot like Java but case-insensitive.

    1. Re:my reasons....... by KDan · · Score: 4, Insightful

      Additional reasons:

      Because it makes naming conventions much easier without all sorts of silly prefixes. You'll come to appreciate the fact that, in Java, if a term looks like MyTerm you know it's a class name, if it looks like myTerm you know it's a variable or a method name (recognisable because it's followed by brackets, even when there are no arguments - something which I'm sure you'll be griping about too, right?), if it looks like MY_TERM you know it's a constant...

      Because good programmers aren't bothered by such trifling matters?

      Daniel

      --
      Carpe Diem
    2. Re:my reasons....... by Sklivvz · · Score: 0, Flamebait

      Because it makes sense that all symbols are uniquely identified from a set of characters, rather than each symbol being identified by a huge set of names (var, vaR, vAr, vAR, etc). There may be a need for a "canonical name", which is it? All lowercase? All uppercase?

      You define a convention and stick to it. Tipically: first word lowercase, other words uppercase first like "thisIsAVariable".

      Because it makes dynamic programming and reflection even slower and/or more error-prone (I have experienced this in PHP which is case-insensitive and it bugged the hell out of me [and my program]).

      Slower? There's just one more pass involved (an OR in the letters) which you parse anyways. I would hardly call it slower. And that is ONLY in BAD, SELF-WRITING code.
      Also please explain how does case insensitivity generate bugs. It actually prevents bugs by understanding that var and Var are actually the same thing!

      Because it takes fewer CPU cycles when compiling or scanning source code.

      Yeah, and then forcing you to recompile because you wrote FOo instead of Foo by mistake. Big save!

      Because some languages use case to indicate a different class of variable (Ruby for instance, issues a warning if you try and change a variable starting with uppercase).

      That's a bad language specification. in C you cannot change a variable you declare as constant, obvious, in Ruby it is not so apparent what is constant and what is not.

      Because many programmer's text editors are case-sensitive (I know, I know, chicken, egg, etc).

      How can a text editor be case sensitive????

      Because lowercase/uppercase could be a harder problem if you use a language which allows Unicode symbols (Perl6?). (Is this possible? I have no idea).

      There is no difference, basically. And Java supports uppercase functions for unicode in any case...

      Because sometimes it actually is useful to have a symbol "ID" and another one "id" in the same symbol table.

      It's a very very bad programming practice! Come on you can use id1 and id2...

      Because stuff like case and english language is not part of programming, programming is about precision and computers. Introducing ambiguity (whether for the compiler or the programmer) can't be good.

      Case sensitivity is way more ambiguous by allowing
      bar and Bar to be different variables whereas in English a bar and a Bar are no different.

      Because C is case-sensitive, and C is a popular language.

      And so?

    3. Re:my reasons....... by Pogue+Mahone · · Score: 4, Insightful
      Many natural languages have case-sensitivity too - German, for example: fliegen (verb) and Fliegen (noun) are different words.

      But why a big list of reasons FOR case-insensitivity?

      IMHO the question should be turned around to "Why should anyone want case-insensitivity in a language?" (since, as you say, it has to be put there and requires more work in the part of the compiler and/or the compiler writer).

      Then it is up to those who want case-insensitivity to argue their case against the simplest implementation.

      --
      Every bloody emperor has his hand up history's skirt [Peter Hammill/VdGG]
    4. Re:my reasons....... by Anonymous Coward · · Score: 0

      Because it sucks???
      I mean...

    5. Re:my reasons....... by Shazow · · Score: 2, Interesting
      Because sometimes it actually is useful to have a symbol "ID" and another one "id" in the same symbol table.

      This kind of made me think of my calculus homework which I should be doing right now. Especially for integration, and such. We've variabled "m" and "M". Sure, in a program, it wouldn't be hard to change them to something else like "bigM" and "littleM", but it would sure make the code a lot simpler to read to just have "m" and "M". This is in a case where you're writing a calculus-related program. Eg. a graphing calculator.

      Just a thought.

      - shazow
    6. Re:my reasons....... by TRACK-YOUR-POSITION · · Score: 1
      You define a convention and stick to it. Tipically: first word lowercase, other words uppercase first like "thisIsAVariable".

      So case sensitivity enforces your convention. (Though usually programmers have more sophisticated conventions). Otherwise, THISISAVARIABLE compiles. Since reading /debugging code is harder than writing it, it makes sense for the programming language to strictly require readable code.

      Slower? There's just one more pass involved (an OR in the letters) which you parse anyways. I would hardly call it slower.

      About twice as long for a string comparison is what I would definitely call slower.

      And that is ONLY in BAD, SELF-WRITING code.

      Including all interpretted scripting languages, loadable plugins, and just-in-time compiled code, the last of which being safer and (some day) faster than standard compilation?

      Also please explain how does case insensitivity generate bugs. It actually prevents bugs by understanding that var and Var are actually the same thing!

      In Java, since you have to explicitly declare variables before use, the compiler will notice that you typed Var when you meant var and complain. Your criticism is correct about, say, Python, because in Python referring to Var means a new variable Var is created. I believe Python is still case sensitive, because of speed reasons, although Python's developers would prefer case insensitivity if it had no speed cost, I suspect.

    7. Re:my reasons....... by larkost · · Score: 0, Flamebait

      In you example the case of the word is only because proper nouns are capitalized in German by convention. The capitalization does not actually help you differentiate between the verb "to fly" and the plural of the insect "a fly" any more than it would in English. What really sets them apart is their position in the sentence.

      Your example actually points out how pointless it is to have case sensitivity.

    8. Re:my reasons....... by Tom7 · · Score: 1

      About twice as long for a string comparison is what I would definitely call slower.

      Parsing is about the easiest and fastest part of compilation that there is. You would not even be able to measure the difference.

    9. Re:my reasons....... by Prior+Restraint · · Score: 1

      How can a text editor be case sensitive????

      I suspect that was a reference to syntax-highlighting. If so, it's a bad example.

      Case sensitivity is way more ambiguous by allowing bar and Bar to be different variables whereas in English a bar and a Bar are no different.

      Bad example. If I'm talking about someone on IM, and I type, "He's a dick," it means he's an asshole; if, instead, I type, "He's a Dick," it means his name is Richard.

    10. Re:my reasons....... by Anonymous Coward · · Score: 1, Funny

      "He's a dick," it means he's an asshole

      You have a very interesting definition of dick. Remind me not to ask you any anatomy questions.

    11. Re:my reasons....... by smcv · · Score: 5, Insightful
      Case sensitivity is way more ambiguous by allowing
      bar and Bar to be different variables whereas in English a bar and a Bar are no different.


      That's not ambiguity. Ambiguity is saying one thing which could mean several things; according to your assertion, case-sensitive languages have more than one way (Bar vs bar) to say the same thing.

      English isn't case-insensitive, anyway. When you encounter a capital letter, it's telling you something (that it's the beginning of a sentence, or part of a title, or a proper noun, ...).

      Because lowercase/uppercase could be a harder problem if you use a language which allows Unicode symbols (Perl6?). (Is this possible? I have no idea).

      There is no difference, basically. And Java supports uppercase functions for unicode in any case...


      There is a huge difference. In the "basic" Roman alphabet (with no accents or anything, as implemented in ASCII) there is a 1-to-1 mapping between upper and lower case; this isn't always true in general.

      For instance, in German there is the "s-set" (which looks a lot like a lower-case beta), which is more or less interchangeable with the character pair "ss". It upper-cases to "SS" (i.e. there is no capital s-set). With that in mind, in a case insensitive Unicode-based language, how many of strasse, stra(s-set)e, STRASSE should be equivalent?

      Once you've finished hard-coding your case comparison rules, what other equivalences are allowed? Is a-acute ("a" with an acute accent, which Slashcode doesn't seem to want to let me post) the same as "a", bearing in mind that both are conventionally upper-cased to A in French, and is the correct answer "if and only if the programmer is French"?

      Being case-sensitive also lets you compare raw byte sequences rather than canonicalising everything, which is no big deal in ASCII (just AND all letters with 0x20) but is intricate and fiddly in Unicode (hence lots of code and memory for all the esoteric rules required).

      On a related note, I think filesystems should also be case-sensitive (like Unix, and unlike Windows and usually Mac OS X); if you want a helpful "ignore small differences" algorithm, it should happen at the user interface level, and it should be possible to override it, like the way you can put double quotes round a non-.txt filename in Notepad to prevent it from appending ".txt".

      Being able to have "Letter.doc" and "letter.doc" in the same directory seems to me to be no more confusing than being able to have "Letter (21 Jan).doc" and "Letter [21 Jan].doc", or even "a_b", and "a__b" (for greater confusion, replace the underscores with spaces, but that wouldn't display properly in Slashcode). It's inconsistent to be sensitive to one small variation, but ignore another, particularly when the main principle of working with computers is "say exactly what you mean".

      (I dislike extension hiding for the same reason; "you can't have two files with the same name, except when they're different types of file"? What sort of a silly rule is that?)
    12. Re:my reasons....... by hotgazpacho · · Score: 1

      (I have experienced this in PHP which is case-insensitive and it bugged the hell out of me [and my program])

      I beg to differ! Quoth the PHP manual:

      Of course, there is an exception:
      Function names are case-insensitive, though it is usually good form to call functions as they appear in their declaration.
    13. Re:my reasons....... by Sklivvz · · Score: 0, Redundant

      So case sensitivity enforces your convention. (Though usually programmers have more sophisticated conventions). Otherwise, THISISAVARIABLE compiles. Since reading /debugging code is harder than writing it, it makes sense for the programming language to strictly require readable code.

      A case sensitive compiler lets you do horrible things like having two properties of an object with the same name except for the case. Example: myObject.list and myObject.List. A case insensitive compiler won't let you have that.
      Readable code is a human responsibility, and can't be delegated to a mere compiler.
      How is it again that it "strictly requires readable code"?

      About twice as long for a string comparison is what I would definitely call slower.
      (...)
      Including all interpretted scripting languages, loadable plugins, and just-in-time compiled code, the last of which being safer and (some day) faster than standard compilation?


      Did you know that Java is actually compiled? All the case insensitive stuff would be sorted out when producing bytecode. You just need to sort out issues when you have statements lik "eval" where a string, created at runtime, is executed as code (which is the BAD programming practice i was referring to above).

      In Java, since you have to explicitly declare variables before use, the compiler will notice that you typed Var when you meant var and complain. Your criticism is correct about, say, Python, because in Python referring to Var means a new variable Var is created. I believe Python is still case sensitive, because of speed reasons, although Python's developers would prefer case insensitivity if it had no speed cost, I suspect.

      In a case insensitive compiler, there would be no error, the code would just work. And, the merit of java is having to declare variables, it has nothing to do with case-sensitivity.

    14. Re:my reasons....... by mapMonkey · · Score: 1

      All nouns in German are capitalized, not just proper nouns, so the capitalization is enough to indicate one form as the verb and the other as the noun.

    15. Re:my reasons....... by Sklivvz · · Score: 1

      That's not ambiguity. Ambiguity is saying one thing which could mean several things; according to your assertion, case-sensitive languages have more than one way (Bar vs bar) to say the same thing.

      ...just like in the English language. It's more natural to me to expect Bar, bar and BAR to be the same variable than not. I think it's ambiguous to have two different variables which, read in English, are the same word.

      English isn't case-insensitive, anyway. When you encounter a capital letter, it's telling you something (that it's the beginning of a sentence, or part of a title, or a proper noun, ...).

      Sure. That's why you have 2 entries for each word in dictionaries, one for capital letter words, and one for lower case words... ;-) Get my point?

      There is a huge difference. In the "basic" Roman alphabet (with no accents or anything, as implemented in ASCII) there is a 1-to-1 mapping between upper and lower case; this isn't always true in general.

      How is this a problem? Case insensitivity means to treat letters which have upper and lower case versions indifferently. Letters which have no uppercase or lowercase are treated just like numbers (which also means that it's not true that you have a 1-1 mapping in ASCII).

      Being case-sensitive also lets you compare raw byte sequences rather than canonicalising everything, which is no big deal in ASCII (just AND all letters with 0x20) but is intricate and fiddly in Unicode (hence lots of code and memory for all the esoteric rules required).

      A compiler implements (at least in its libraries) the same esoteric rules. Just applying a uppercase to your tokens before compiling is not a big issue.

      On a related note, I think filesystems should also be case-sensitive

      I find it wierd too.

    16. Re:my reasons....... by Mr.+Slippery · · Score: 1
      A case sensitive compiler lets you do horrible things like having two properties of an object with the same name except for the case. Example: myObject.list and myObject.List.

      No, the compiler wouldn't object. Compilers will let you do many deliberately stupid things.
      #define TRUE 0
      for example, is perfectly valid C. But try putting it into your program and see what happens when the next coder comes across it, remembering John F. Woods advice: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."

      Compilers are supposed to help prevent accidental stupidity. What protects against deliberately stupid things is your fellow coders beating you to death with your own keyboard.

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    17. Re:my reasons....... by Nyarly · · Score: 1
      That's not ambiguity. Ambiguity is saying one thing which could mean several things; according to your assertion, case-sensitive languages have more than one way (Bar vs bar) to say the same thing.

      ...just like in the English language. It's more natural to me to expect Bar, bar and BAR to be the same variable than not. I think it's ambiguous to have two different variables which, read in English, are the same word.

      Okay, that's just fuzzy thinking. "bar" and "Bar" in English have vastly different meanings. One is any length of metal or place of business that sells alcohol. The other is either the same, but beginning a sentance, or a specific and important example of the same. And "BAR" is short for "Browning Automatic Rifle." And that's in sloppy, messy, subtle and ambiguous natural language English (as very distinct from "english".)

      As such, it's completely reasonable to make a compiler case-sensitive. As a programmer, I mean very different things by aVariable and AVariable.

      I find well-used capitalization improves the human readibilty of code. The last place I want sCriPt-kIDDie caps-slip is in decent code. If a language constraint makes that difficult, I applaud it.

      The strongest rationale I can see not change an existing language is that it would break a wealth of existing code. The extension of that reasoning is that a new language should tune its sensitivity to it programmer audience. If you're writing a language aimed at existing C programmers, make it case sensitive. If you're aiming at some other group, perhaps case insensitive syntax is acceptable.

      I'd like to emphasize how difficult it is to not think (and write) "professional programmers" for "C programmers" and "VB hacks" for "some other group." But I wouldn't want anyone to think I was biased.

      --
      IP is just rude.
      Is there any torture so subl
    18. Re:my reasons....... by scrytch · · Score: 1

      > Because it makes sense that all symbols are uniquely identified from a set of characters, rather than each symbol being identified by a huge set of names (var, vaR, vAr, vAR, etc). There may be a need for a "canonical name", which is it? All lowercase? All uppercase?

      LISP says all uppercase. VB says the case you DIM'd it or first used it with. Common idiom in VB is to always mix caps in vb when declaring, never reference it with caps, and let the editor correct the case. No case correction means you're referencing a nonexistent variable.

      Arguments to change existing languages are misguided and futile. The argument is still a good one to keep in mind concerning new languages.

      The introspection argument is a good one, though it's nothing canonical case doesn't cover. A case-folding associative array comparison will also work (assuming you can attach custom comparison functions to your assocarray types).

      Java was flogged as the Great Leap Forward in programming, but turned out to be an anemic imperative language. It may grow a few features, but will never be what lisp or caml programmers are looking for. Its only hope comes in better IDE's and languages that compile to Java, at which point you only have to worry about the primitive ucsd p-code inspired runtime VM.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    19. Re:my reasons....... by bloo9298 · · Score: 1
      Did you know that Java is actually compiled? All the case insensitive stuff would be sorted out when producing bytecode. You just need to sort out issues when you have statements lik "eval" where a string, created at runtime, is executed as code (which is the BAD programming practice i was referring to above).

      What a quaint, old-fashioned view. :-)

      More seriously, the grandparent poster also referred to dynamic loading/linking, which is used a lot and is not normally considered bad practice. It is unreasonable to equate interpreting runtime-generated source code with dynamic loading/linking.

    20. Re:my reasons....... by endofoctober · · Score: 1

      Not exactly. Word order is a convention in German, but has little/no bearing on the meaning. For that, German changes the article, noun and its modifiers. Quite the opposite from English where syntax/word order weigh heavily on the meaning of the sentence, but the words themselves don't change.

      "Man bites dog" in English depends on word order to tell who the victim is - in German, you can say "Der Mann bisst den Hund" or "Den Hund bisst der Mann", and they actually mean the same thing (although few Germans would say the latter).

      For me, case sensitivity gives coders better visual cues when they deal with hundreds of variables. TimeoutStringStart is much easier to read than timeoutstringstart or TIMEOUTSTRINGSTART. My philosophy on this is, if it's easier to read, it's easier to debug.

      --
      - Jack
    21. Re:my reasons....... by scrytch · · Score: 1

      > Many natural languages have case-sensitivity too - German, for example: fliegen (verb) and Fliegen (noun) are different words

      One means fly, the other means flies (plural of fly). It might have been a little better if they weren't actual homonyms. English often has fun with this ambiguity, and I suppose those wacky Germans do too, but spoken German sure isn't case-sensitive. only an idiot would fail to grasp the or meaning context in a written sentence. i failed to capitalize the last couple sentences, and it would be marked down if it were a paper, but did the meaning of even the individual words change one bit?

      IMHO the question should be turned around to "Why should anyone want case-insensitivity in a language?" (since, as you say, it has to be put there and requires more work in the part of the compiler and/or the compiler writer).

      God forbid compiler writers would have to do any work to make the language work for the programmer and not the computer, eh? Compiler writers, by virtue of writing a compiler in the first place, are already arguing against the "simplest implementation". However, there is something to be said about having to argue for the benefits of a feature such as casefolding (which really isn't as simple as the advocates for it make it out to be). Were I writing another C (low-level systems language), I wouldn't even consider casefolding. Something like Java or python though: you bet I'd at least seriously consider it, even with all the complications it'd add.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    22. Re:my reasons....... by p7 · · Score: 1

      I didn't see it so I will bring up another. Characters that depending on case can be mistaken for another.

      ILL
      ill
      111

      When scanning code in a case insensitive language, you will have to keep an eye out for multiple possible representations of the word. With case sensitivity there will be a uniform representation I can more easily spot when scanning code.

    23. Re:my reasons....... by Prior+Restraint · · Score: 1

      Yeah, I realized my error just after I hit submit. Mea culpa.

    24. Re:my reasons....... by Sklivvz · · Score: 1

      No, the compiler wouldn't object. Compilers will let you do many deliberately stupid things.
      #define TRUE 0
      for example, is perfectly valid C.


      C is a case sensitive language, I was referring to case insensitive langueages. So you are actually agreeing with me by your example :-)
      In a case insensitive language, such example would not compile since TRUE would clash with the keyword "true" which you are not allowed to redefine.

    25. Re:my reasons....... by Sklivvz · · Score: 1

      I find well-used capitalization improves the human readibilty of code. The last place I want sCriPt-kIDDie caps-slip is in decent code. If a language constraint makes that difficult, I applaud it.

      In Java your script kiddie can define vars like IamSokoOl, IAmSoKoOl, iamSokOOl all in the same method/object and get away with it. Try reading that code! :-D

    26. Re:my reasons....... by Sklivvz · · Score: 1

      More seriously, the grandparent poster also referred to dynamic loading/linking, which is used a lot and is not normally considered bad practice. It is unreasonable to equate interpreting runtime-generated source code with dynamic loading/linking.

      What's the difference? I can't see why dynamic loading would require retokenizing/recompiling the source code.

    27. Re:my reasons....... by Sklivvz · · Score: 1

      I'd like to emphasize how difficult it is to not think (and write) "professional programmers" for "C programmers" and "VB hacks" for "some other group." But I wouldn't want anyone to think I was biased.

      You know, having been a professional programmer for the likes of 10 years, I've tried both. I find case sensitivity a stupid practice. That does not mean VB is kool and C sucks... it means that i don't like to recompile my code for stupid reasons like wrong capitals.

    28. Re:my reasons....... by Waffle+Iron · · Score: 1
      Slower? There's just one more pass involved (an OR in the letters) which you parse anyways.

      It's only an OR operation in English and maybe a few other languages. In general, mapping uppercase to lowercase depends on the language and locale currently in use. Moreover, certain languages don't have a 1-to-1 mapping between uppercase and lowercase letters.

      It seems to me that this would mainly be a source of subtle conversion bugs for people who use identifiers that aren't in ASCII english.

    29. Re:my reasons....... by bloo9298 · · Score: 1
      What's the difference? I can't see why dynamic loading would require retokenizing/recompiling the source code.

      Right, dynamic loading/linking doesn't involve the original source code. However, it does involve matching up identifiers and filling in offsets. Either the loader/linker has to match modulo case insensitivity, or all of the code-generation tools have to normalize identifiers. Others have pointed out that both tasks are a bit tricky for Unicode.

    30. Re:my reasons....... by TRACK-YOUR-POSITION · · Score: 1
      A case sensitive compiler lets you do horrible things like having two properties of an object with the same name except for the case. Example: myObject.list and myObject.List. A case insensitive compiler won't let you have that. Readable code is a human responsibility, and can't be delegated to a mere compiler. How is it again that it "strictly requires readable code"?

      Well, in Java, you have to INTENTIONALLY make two different properties of an object which differ only in case (and there are probably code beautifying tools that check for that crap) while in a case insensitve language you could ACCIDENTALLY refer to the same thing with two different cases, detrimenting readability.

      Did you know that Java is actually compiled? All the case insensitive stuff would be sorted out when producing bytecode.

      That could work for the just-in-time compilation issues, but it still leaves extra work for plugins and interpretted scripting languages (but I guess letting users extend their own programs is BAD programming practice, because that would be total anarchy! That's why we must ban the GPL!)

    31. Re:my reasons....... by Sklivvz · · Score: 1

      Right, dynamic loading/linking doesn't involve the original source code. However, it does involve matching up identifiers and filling in offsets. Either the loader/linker has to match modulo case insensitivity, or all of the code-generation tools have to normalize identifiers. Others have pointed out that both tasks are a bit tricky for Unicode.

      I am not sure of this, but I do not expect bytecode to include variable/method/property names. I guess they are encoded with indices. Also the dynamic library would have its own namespace similarly encoded.
      Once you compile it makes no difference.
      Also I still fail to see how uppercasing (lowercasing) is "hard" in Unicode. Java does have functions to do that right? Just use the same algorithm.

    32. Re:my reasons....... by Sklivvz · · Score: 1

      Well, in Java, you have to INTENTIONALLY make two different properties of an object which differ only in case (and there are probably code beautifying tools that check for that crap) while in a case insensitve language you could ACCIDENTALLY refer to the same thing with two different cases, detrimenting readability.

      Ok, so how unreadable does the code become if you write a miscased (?) word by mistake once or twice?
      The most readeable languages I've come across are c# and vb (not a flamebait) - one is CS one is CI.
      But the worst ever readeable languages are CS (Perl, C, C++, even Java with all those casts!).
      Of course it depends on the programmer, but the obfuscated C contest and, well, Perl, do prove a point. You don't get an obfuscated VB contest... :-P

      Oh, and I've been a Perl/Java/C# programmer for the last five years... ;-)

      That could work for the just-in-time compilation issues, but it still leaves extra work for plugins and interpretted scripting languages

      I believe we were talking about Java, not Javascript!

    33. Re:my reasons....... by 91degrees · · Score: 1

      Here's a couple of better examples. "polish" refers to a substance used to make surfaces shiny, whereas "Polish" refers to the language spoken in Poland. "reading" is how one assimilated information in a textual form, whereas "Reading" (pronounced "Redding") is a town in England.

    34. Re:my reasons....... by llefler · · Score: 1

      Because sometimes it actually is useful to have a symbol "ID" and another one "id" in the same symbol table.

      It's a very very bad programming practice! Come on you can use id1 and id2...


      I'm not sure why you got moderated as flamebait. Other than it seems to happen a lot around here on dissenting opinions.

      It comes down to the question that gets asked far too seldom in technology, ie. just because you can do something doesn't mean you should... All the arguments I've seen (enforcing types based on case) could be done in a case insensitive language as well. If the compiler isn't going to enforce the case rules (strong typecasting, something everyone here hates about Pascal), then case sensitivity is a hindrance. And the fact that the 'compiler will catch it' isn't a good thing. With case insensitive languages there is nothing to catch.

      If your imagination is so limited that you need to use myID, MyID, myid, MYID all at the same time, maybe case sensitivity isn't the problem. I'll certainly agree that defining objects that way is a bad practice. I'm as anal as a C programmer with my variable names, even though I work in a case insensitive language. And I don't consider case sensitivity to be a missing feature. OTOH, it is one bug that I don't have to worry about.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    35. Re:my reasons....... by stanmann · · Score: 1

      and reverse polish??

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
    36. Re:my reasons....... by Mr.+Slippery · · Score: 1
      In a case insensitive language, such example would not compile since TRUE would clash with the keyword "true" which you are not allowed to redefine.

      Redefining a keyword has nothing to do with case sensitivity. The abilities are orthogonal: one can have a language that allows redefinition that is either case sensitive or insensitive.

      Neither "true" nor "TRUE" is a keyword in C. ISO C calls for a stdbool.h header to #define "true"; while no such .h file is to be found on my RedHat box, there are other headers that do #define it. "TRUE" is #defined in several headers to be 1.

      The abliity to redefine a macro like this makes both stupid and brilliant things possible.

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    37. Re:my reasons....... by mlc · · Score: 1
      Because lowercase/uppercase could be a harder problem if you use a language which allows Unicode symbols (Perl6?). (Is this possible? I have no idea).
      As an example of a language allowing Unicode symbols take, for example, Java.

      I once worked with some Java code written by Germans. The code won't compile if your locale is C, because they use a few umlauts. What fun, what fun!

    38. Re:my reasons....... by Imperator · · Score: 1
      Because it takes fewer CPU cycles when compiling or scanning source code.

      In US ASCII, converting a letter to a given case requires a single logical operation. Make the canonical form either lowercase or uppercase, and the CPU issue becomes completely trivial on a modern computer. Now, if you want to program in another language, it could be slightly more complicated. Still, I don't think compiler speed is a serious concern.

      Not that I think case-insensitive languages should be allowed to exist, mind you, but...

      --

      Gates' Law: Every 18 months, the speed of software halves.
    39. Re:my reasons....... by 91degrees · · Score: 1

      If you insist

      "hsilop"

    40. Re:my reasons....... by alonsoac · · Score: 2, Insightful

      There may be a need for a "canonical name", which is it? All lowercase? All uppercase?

      Just pick one (lower/upper) and use that as the canonical name, no problem there.

      Because it takes fewer CPU cycles when compiling or scanning source code.

      why?

      Because some languages use case to indicate a different class of variable (Ruby for instance, issues a warning if you try and change a variable starting with uppercase).

      Yes but what about all others?

      Because many programmer's text editors are case-sensitive (I know, I know, chicken, egg, etc).

      I doubt that would be important when designing the language.

      Because sometimes it actually is useful to have a symbol "ID" and another one "id" in the same symbol table.

      That doesn't sound like good programming, more like a quick fix for some design error.

      Because stuff like case and english language is not part of programming, programming is about precision and computers. Introducing ambiguity (whether for the compiler or the programmer) can't be good.

      There is no ambiguity when a canonical name is used.

    41. Re:my reasons....... by PurpleBob · · Score: 1

      Case-sensitive non-homonyms: polish and Polish.

      --
      Win dain a lotica, en vai tu ri silota
    42. Re:my reasons....... by perlchild · · Score: 1

      in English(the one I learned in school), a bar and a Bar can mean different things, depending on where in the sentence they are(and in what sentence, ask any lawyer who'se been de-barred what he calls a "Bar"). That's called syntax, and it is both

      1) more specific than simple case-sensitivity, it's context-sensitivity
      2) implies more knowledge of the language by the person interpreting the words and their use

      Living languages also have several case of homonyms that would drive your usual compiler crazy

      What proper computer language design allows is for code that is LESS sensitive to those factors, as copy-paste, printouts on fanfold paper and several other factors can obscure the context of each line of code, and make them less obvious to whoever has to maintain it.

      All proper text-editors differentiate between all 8 bits of a character, therefore they are stringently case-sensitive. Since my text editor is case sensitive, I can enter
      "Perlchild" as a string value, different from "perlchild". That is good. My editor is not limited to entering identifiers, I can also enter values, I can also edit actual text with it, not just programs(which are specialized forms of text). My text editor is not expected to know what purpose each text has, although if I issue the proper commands to it, it can handle each purpose the way I like, that is also good :)

      Having a specialised editor, called an ide, who would know the specifics of one or more particular languages, and would apply case-insensitivity properly according to the language's rules, and highlight keywords according to syntax, would be a useful tool. But we were arguing if case-insensitivity was a good rule to have for a language, so I'll shut up now

    43. Re:my reasons....... by Pseudonym · · Score: 1

      Having been a professional programmer for the same length of time, I spend less than 0.0001% of my time fixing capitalisation errors. Even less since I started using a text editor with keyword completion.

      This proves nothing, except the maxim that for every anecdote there is an equal and opposite anecdote.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    44. Re:my reasons....... by Pseudonym · · Score: 1
      I am not sure of this, but I do not expect bytecode to include variable/method/property names.

      In Java, they do. Moreover, there are punctuation marks (e.g. '/' for package name separators, other characters for type mangling etc) so case folding is not as simple as oring every character in the string. Take a look.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    45. Re:my reasons....... by Sklivvz · · Score: 1

      case folding is not as simple as oring every character in the string

      Ok, so you can't OR a char to get the UC corresponding char. You can use a 64k lookup table. Fast and easy.
      Before people start complaining about embedded Java, a couple points. The UC function is provided (methinks) on the same platforms, so the table is there. Also, if you really want to save space on small platforms, use ASCII instead of Unicode in varnames... You can write fuctionally equivalent code without resorting to (say) cyrillic varnames.

    46. Re:my reasons....... by scrytch · · Score: 1

      > Case-sensitive non-homonyms: polish and Polish.

      Whaddya know, I've been pronouncing my favorite brand "Old English Furniture Polish" the wrong way all these years...

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    47. Re:my reasons....... by WhiteDragon · · Score: 1

      it means that i don't like to recompile my code for stupid reasons like wrong capitals.


      That is no different than recompiling for stupid reasons like forgetting a semicolon at the end of line. When I was first learning to program, I frequently forgot them, and the compiler let me know. Now, I almost never forget them.
      --
      Did you mount a military-grade, variable-focus MASER on an unlicensed artificial intelligence?
    48. Re:my reasons....... by Anonymous Coward · · Score: 0

      Uhm, how hard is it to remember how you capitalized things? Your conventions will go something like: classes in camel case initial word capitalized, members in camel case initial word lowercase, #defines in all caps with words separated by underscores, locals in lowercase with words separated by underscores, and globals in lowercase with words separated by underscores and an initial word of g (e.g., the global screen_dim is written g_screen_dim). Your exact guidelines may differ.

      If you stray from the conventions, you get an error. If you're using a civilized editor that has some level of integration with your compiler, then it takes a key press to start a compile, a key press to jump to the line with the error on it, and a few keypresses to fix the case (if it doesn't have the ability to automatically fix the case for you). That's a small price to pay for consistency. If you really don't like case sensitivity... uh, then type everything in lowercase. Problem solved.

    49. Re:my reasons....... by Haeleth · · Score: 1

      When scanning code in a case insensitive language, you will have to keep an eye out for multiple possible representations of the word. With case sensitivity there will be a uniform representation I can more easily spot when scanning code.

      Not in a language like Java, which permits Unicode identifiers. In Java, it's possible to have two identifiers Area and Area - did you notice that the second one begins with a Greek alpha character?

      (Well, okay, it doesn't because this is Slashdot, but it would in Java.)

    50. Re:my reasons....... by Pseudonym · · Score: 1
      You can use a 64k lookup table. Fast and easy.

      No you can't. As previously mentioned, many languages don't have 1:1 mappings for case conversion. German, for example maps the lower case es-set to capital "SS". That's two glyphs. There are some which require three.

      It also doesn't solve problems of languages sharing glyphs, which were also previously mentioned. One might expect, for example, lower-case English "a" and lower-case Greek "alpha" to be different variables, but they map to the same upper-case glyph. Then there's the special Turkic rule for uppercase I and dotted uppercase I.

      This is all covered in section 5.18 of the Unicode 4.0 standard.

      Interestingly, there are also case folding rules for Deseret which is outside the basic multilingual plane. I think most Mormon programmers speak English, though, so we can probably ignore this for now.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  6. Java by GuyWithLag · · Score: 5, Interesting

    Take a look at eclipse. Not only is it a subperb IDE that you can pick up within the hour, it has the correct-my-case-for-me feature you asked for.

    Note that in Java case has by convention semantic significance, so that you can discern org.foo.Bar.bleh from org.foo.bar.Bleh.

  7. Namespaces by HalfFlat · · Score: 4, Informative

    One advantage of case-sensitivity of variable names and the like is that it allows ad hoc separations of name spaces.

    For example, it is a common practice in C to use ALLCAPS for macro definitions and alllowercase for variable and function names. If adhered to strictly, it means that there won't be any collisions between variable and macro names.

    It can be convenient in maths heavy code too, where the use of long variable names quickly makes the code hard to read due to excessive line lengths. Being able to use short upper case names for 'big' objects (eg matrices or operators) and short lower case names for 'small' objects such as scalars matches mathematical convention and keeps equations short and readable. Case sensitivity means that there won't be any accidental collisions between the two sets of objects.

    It's certainly not necessary, but it can make life a lot easier. If you don't expect your language to ignore case, then you're unlikely to make case-based errors as a programmer. Especially if you're coming from a mathematical background where 'A' and 'a' rarely refer to the same thing.

    1. Re:Namespaces by IIEFreeMan · · Score: 2, Funny

      Concerning the long variable and the difficulty of writing mathematical code with those. I heavily suggest making use of the refactoring features of your IDE of choice (eclipse hopefully) to rename variables. This way you can write your code with small and obscure variable name and when your code is working you just have to rename your variables to something meaningful :)

    2. Re:Namespaces by a_hofmann · · Score: 1

      the parent poster is absolutely correct... there are applications where the source code analog af a real world problem can be more expressively written if different cases are enforced.

      to be able to differentiate macros/template parameters/any syntactic special cases is nice too.

      i do mostly c++ development and only write lower case code. that excludes only macros and templates, both which are processed before the actual compilation by a pre-processor. this allows me to quickly catch the 'meta' programming snippets which are prone to errors and conceptually on a different level of programming. all usual code is nicely formatted with color by my editor, so adding case to it just makes it more difficult to read...

      my proposal: get strict, enforce lower case in languages! btw, have i already mentioned that i support dropping case in any language? :)

    3. Re:Namespaces by KDan · · Score: 1

      Yes, and the 500-columns expressions that result will be very readable for the next person to read your code...

      Daniel

      --
      Carpe Diem
    4. Re:Namespaces by IIEFreeMan · · Score: 1

      If you are using eclipse, it will reformat your code so it doesn't expand over X columns. If you want X=500 that's fine with me (I prefer 120) :)

    5. Re:Namespaces by KDan · · Score: 1

      Alright, so make that the 20 lines. Not much better.

      Daniel

      --
      Carpe Diem
    6. Re:Namespaces by Anonymous Coward · · Score: 0

      "mathematical"

      Shouldn't that be mathsematical? Or do you guys say 'maths' simply to fuck with the upper-class lisping inbreeds over there?

    7. Re:Namespaces by smcv · · Score: 1

      Mathematical = to do with mathematics, of which maths is an abbreviation (USAians just abbreviate slightly further).

    8. Re:Namespaces by FigWig · · Score: 1

      What's the obsession with the term USAian, you UKian?

      --
      Scuttlemonkey is a troll
    9. Re:Namespaces by Haeleth · · Score: 1

      Canadians, Brazillians, Mexicans, and even Jamaicans and Cubans are American without being citizens of the USA, while Hawaiians are citizens of the USA without being American. Therefore we need a word other than "American" to describe citizens of the USA. And we don't feel very comfortably using "Yank" in case you're from the Southern states.

  8. caseSensitivityIsAGoodThing by standsolid · · Score: 1

    I think case sensitivity is rubbish too.

    How many times have I seen some stupid error message...

    upper.cpp:2391: error: `casesensitive' undeclared (first use this function)

    argh! then I search for minutes on end for that one stupid not capitalized letter.

    i'm all for non-case-sensitizing things.

    --
    WTPOUAWYHTTOTWPA
    What's the point of using acronyms when you have to type out the whole phrase anyways?
    1. Re:caseSensitivityIsAGoodThing by GuyWithLag · · Score: 1

      upper.cpp:2391: error: `casesensitive' undeclared (first use this function)

      Sorry to say this, but if you need to search for minutes to find a 13-letter identifier on a specific line in a specific file, I don't want to know what that lines length is!
    2. Re:caseSensitivityIsAGoodThing by standsolid · · Score: 1

      lol

      you'd be really suprised just how stupid I am.

      i have spent long times staring at code only to realize "Oh... capital Z"

      kinda like "Oh.... semicolon...."

      --
      WTPOUAWYHTTOTWPA
      What's the point of using acronyms when you have to type out the whole phrase anyways?
  9. OMG by DarkDust · · Score: 4, Funny

    Today I use modern languages including Visual Basic

    Real programmers don't use (Visual) BASIC... at least not after puberty ! ;-)

    1. Re:OMG by irc.goatse.cx+troll · · Score: 1

      They do if they wan't a paycheck. VB.NET really isn't that bad, and I've always seen VB as the shellscript for windows --Its a neat way to hack applications together with COM.

      --
      Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    2. Re:OMG by Daen+Kolarin · · Score: 1

      I'd have to object, VB has it's uses.

      If all you want to do is build a GUI for a database backend it's a heck of a lot faster and simpler to build it in VB.net than with Java or C.

      also since it compiles to the CLR now it's not even agonizingly slow anymore.

      Of course, I wouldn't even dream of building a client that had any appreciable processing to do in VB.

    3. Re:OMG by BigBadDude · · Score: 1

      I agree with you on this.

      saying a real programmer uses VB
      is not far from saying that a real programmer uses HTML :)

    4. Re:OMG by BigBadDude · · Score: 1

      NO!

      building GUIs in Java (and C++ with MFC) is easier for those pros who have learned the language.

      of course, doing GUI work in by drag-n-drop in VB is the easiest option if you are a total newbie, but it wont give you 100% control of the GUI [why are real/complex components written in C++ and not VB?]. So what you basically are saying is that since im a total newbie and I can use VB but C++ is too hard for me, then VB is better than C++ (or java).

    5. Re:OMG by DarkDust · · Score: 1

      I'd have to object, VB has it's uses.

      If all you want to do is build a GUI for a database backend it's a heck of a lot faster and simpler to build it in VB.net than with Java or C.

      Yes, I know it's used for "dumb" UI's and prototypes since you get something that you can see and "grab" very quickly, but doing big (> 10.000 lines of source) programs with VB would be insane, IMHO. After all, the "Visual" is followed by "BASIC" which still after all those years means "Beginners' All-purpose Symbolic Instruction Code". The language was meant for your first steps in the world of programming, and never was intended to be used for "real" applications.

      I'd really like to know which language would be billg's favourite if he hadn't written BASIC interpreters in the first days of MicroSoft...

      I personally don't like VB, for many reasons... to it's just a toy.

      In the style of E. W. Dijkstra (please forgive me): The use of Visual BASIC cripples the mind and should therefor be considered a criminal offence. ;-)

    6. Re:OMG by Anonymous Coward · · Score: 0

      Right, they've graduated to "perl."

    7. Re:OMG by PainKilleR-CE · · Score: 1

      Yes, I know it's used for "dumb" UI's and prototypes since you get something that you can see and "grab" very quickly, but doing big (> 10.000 lines of source) programs with VB would be insane, IMHO. After all, the "Visual" is followed by "BASIC" which still after all those years means "Beginners' All-purpose Symbolic Instruction Code". The language was meant for your first steps in the world of programming, and never was intended to be used for "real" applications.

      Realistically, whatever intents there were originally for BASIC, VB.Net is pretty effective as a fairly complete programming language that's good for beginners and useful for real programming tasks. I personally don't use it much [any longer], especially for larger programs, but it's because I'm more fond of C/C++ -style syntax and use C# for most programs that need to be done and debugged in a short timeframe on Windows. In other words, I don't use VB.Net because I don't like to read it, but it's perfectly capable of doing what needs to be done most of the time (especially since it's fairly easy to call C/C++/C#/etc dlls from most .Net languages, including VB).

      --
      -PainKilleR-[CE]
    8. Re:OMG by Glonoinha · · Score: 1

      Real programmers don't program GUIs - they program the faceless back end data manipulations and calculations, real-time missle guidance systems and the code that keeps fusion plants running along at 96% capacity. Real programmers write recursive self modifying code, but only when necessary. Real programmers first try to understand the task at hand and then pick a language that best suits the business needs, even if it means programming in Visual Basic, or in a language they don't know yet and have to learn during the course of the project.

      Once they get it working, they hand it off to a newbie so the newbie can code the front end, usually in VB.

      --
      Glonoinha the MebiByte Slayer
    9. Re:OMG by lscoughlin · · Score: 4, Insightful

      You're snobbish hatred of a language that's really Not That Bad is indcative of the fact that you are not "A Real Programmer".

      Some very powerful things have been done with visual basic, and the true test of a "Real Programmer" is doing those Powerful Things on time, underbudget, and in Good Working Condition regardless of the environment of choice for the application.

      Notice my hideous but Meaning Laden usage of capitalization. While i don't believe that a capitalization scheme should be enforced by the compiler, i do appreciate having it as a tool to enforce coding standard schemes.

      Smurfy,
      -T

      --
      Old truckers never die, they just get a new peterbilt
    10. Re:OMG by TwistedSquare · · Score: 1
      While I agree that a good programmer will use the right tool for the job, I don't think that means we should be blind to criticism of the tool. Visual Basic happens to be a personal hated language of mine for many reasons; automatic variable declaration leads to far more problems than it solves (yes I know it can be turned off), I do not like variant types, the ByVal/ByRef seems too subtle for my liking, some of the object schemes are very strange in VBA (excel cells for example) and flexible syntax is not up there on my list of good things.

      This is all IMHO of course, but I'm afraid I couldn't read that VB is "Not That Bad" without biting...

    11. Re:OMG by vadim_t · · Score: 1

      I can confirm that from experience. I maintain a 50000 line VB program. It's VERY annoying.

      Just a few issues you find when programming in VB:
      On computer A the compiler crashes at random, but after a few tries works.

      On computer B the compiler works fine, but the resulting executable doesn't run.

      The IDE has some stupid bug where a "component" gets a "reference" line in then project file, with the result of having to open it and fix by hand.

      Either ADO or VB have a really annoying quirk, where an error ocurring inside a stored procedure will not be noticed inside the application if it was called with Connection.Execute. It will work if I build a Command object.

      And this is without even beginning to discuss the problems that are there by design, like a lack of decent inheritance, and the ability to build static libraries.

      There's so much crap to deal with that I think it'd be a big improvement to throw it all out, put Linux on the terminals, and code the interface with PerlQt.

    12. Re:OMG by neilio · · Score: 1

      > You're snobbish hatred of a language that's really Not That Bad is indcative of the fact that you are not "A Real Programmer".

      Right on! I don't like vb because I don't like windows. However, if my boss hands me a VB project I will do it without complaint and do the best I can to make VB do what the spec says it should.

      Your language should be determined by the customer, and available equipment. I always try to steer clear of VB, but if the dept has an SQL server they want to talk to from an IIS box, you don't want to go trying to use php-cgi and odbc for the job. ADO and asp makes more sense.

      Learn as many languages as you can and get good at all of them. You will probably need all of them eventually, if you want to keep working; )

      Limiting yourself to one, or a family of languages related to a high dollar product means you might find it hard to get a job one day.

      My dad taught me to always use the right tool for the job. He was referring to a 10mm socket. Same thing applies to languages.

      Need a free CMS? Zope. Learn python.
      Need an all IBM app server? Websphere. Learn java.
      MS Shop? .Nut Learn C#

      Hopefully you get what I am saying. Most companies have narrow set of technologies they allow and support. You need to be able to adapt when times are bad and jobs get scarce.

      neilio

    13. Re:OMG by exp(pi*sqrt(163)) · · Score: 1
      Your language should be determined by the customer
      Um, no. The language should be determined by the people who know what they are doing. This is generally not the customer.
      --
      Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
    14. Re:OMG by IPFreely · · Score: 1
      In this context, "customer" is a fairly vague term. It could be an IS manager hiring you on contract. It could be a project that already has a code base and you are just adding functionality. It could be the customer already has a large installed client base and "your favorite language" doesn't fit in very well. And in my experience, the customer often knows more than you think. They don't always tell you up front (that's a whole different problem) but they have good reasons for what they want.

      Their are planty of cases where the programmer simply doesn't have the choice of language or tool to use. You take what they give you and make the best of it. If you can't do it, then they'll get someone else who will. Then what has your language snobery gotten you?

      --
      There is nothing so silly as other peoples traditions, and nothing so sacred as our own.
    15. Re:OMG by Haeleth · · Score: 1

      I do not like variant types, the ByVal/ByRef seems too subtle for my liking...

      Don't like Variant types? I hope you don't use perl or any other dynamically typed language, then, because that's the same thing.

      The ByVal/ByRef distinction is too subtle? I sure hope you don't use C++, then, because you'd never cope with the difference between int foo (int bar) and int foo (int& bar).

      So you obviously don't use perl (or Python, Ruby, or Java) or C++ (or C - pointers are too like ByRef arguments), and you can't stand VB... what language do you program in?

    16. Re:OMG by TwistedSquare · · Score: 1
      It seems I should have explained myself better with regard to ByVal and ByRef. It is not really the difference that bugs me but that whereas with C(++) you see the difference in the function prototypes, it is never as obvious when calling a VB function whether your parameter can be changed. Because the extension feels like it was tacked on to the language and is not used as often as say pointers in C, I don't always consider checking for a byref, and then trouble starts.

      As for variant types, no I don't like dynamically typed languages much. I use perl but don't build anything big in it because of the holes that would appear (someone else, in this topic I think, likened letting perl be used for big projects to letting someone who could patch some electrics design them from scratch).

      My main reason against them is that it leads to sloppy programming once the program grows. Take any perl function and tell me whether it takes lists, scalars, or hashes or references, and you can't tell without looking into the function, and even then you can pass the wrong times and have subtle effects rather than major errors, and this might not be noticed until runtime when an obscure path of execution is taken, something that is eliminated with static checks in other languages.

      As for languages I use, since you asked my main language is C++, I also use Perl for small tasks (mainly text conversion) and use Prolog at work.

  10. CasESEnsivity iS gOod. by noselasd · · Score: 4, Insightful

    When I make a class Person {..} I want the other developers to use
    Person person = new Person(..); not
    person person = new perSon();

    It also becomes a mess when you have some people write
    If(something){
    }
    later you see IF or if.
    Case sensivity preserves sanity and helps enforce coding standard.
    It's a good thing, learn to deal with it.

    1. Re:CasESEnsivity iS gOod. by Anonymous Coward · · Score: 0

      didn't your Mum tell you that you should prefix you're up class names with a capital C

      CPerson Person = new CPerson(..);

      'person person equals new person' sure that keeps your sanity, which planet are you from?

    2. Re:CasESEnsivity iS gOod. by smcv · · Score: 1

      In Unrealscript (the Unreal engine's Java-ish scripting language), the same convention will work:

      local Actor actor;

      However, it's case-insensitive and recognises from context whether you mean a class or a variable (classes and variables effectively have separate namespaces), so you can actually do

      local Actor Actor;

      and that'll still work.

      It can be annoying when trying to write Unreal Tournament mods in x86 Linux (compiling under Wine, testing in the native version of UT), since a lot of the source files are named with inconsistent case (the usual convention is InitialCapitalsOnWords, but not always).

      IMO case-sensitivity is much nicer than case-insensitivity; in the Java standard library, distinguishing between SomeUnwieldyThingWithManyWords (a class) and someUnwieldyThingWithManyWords (a variable) can be hard, but if your class and instance names are a more sensible length (a couple of words) there's a big visual difference in something like "shortName = new ShortName()".

      My current weapon of choice is Python, in which you can get away with very short generic names:

      from hypothetical.xmllib import Parser
      parser = Parser()

      and if there happens to be a clash, it's no big problem:

      from hypothetical.xmllib import Parser
      from hypothetical.richtext import Parser as RTFParser
      # an instance of hypothetical.xmllib.Parser:
      parser = Parser()
      # an instance of hypothetical.richtext.Parser:
      rtfParser = RTFParser()

      (of course, for legibility you might use XMLParser and xmlParser instead of Parser and parser, unless you're using the XML parser all the time and the RTF parser very little).

    3. Re:CasESEnsivity iS gOod. by BigBadDude · · Score: 1

      thats MS coding conventionfor C++.
      of course, if bill gates decided that it is good for you, you have no right to argue.

      (the newer version of MSVC++ IDE will enforce this by deleting files that do not follow this convention)

      anyway, what do you thing about CWnd::m_hWnd ?

    4. Re:CasESEnsivity iS gOod. by Anonymous Coward · · Score: 0

      didn't your Mum tell you that you should prefix you're up class names with a capital C

      What happen?
      Someone prefix you're up the class name.

    5. Re:CasESEnsivity iS gOod. by Anonymous Coward · · Score: 0

      Amen, brother.

      Those who feel case sensitivity hinders their programming skills are probably the same folk who feel indenting code is also a waste of time.

      If Java's case sensitivity is that much of a concern, IMHO, how well will you adapt to comprehending the advanced facilities that are provided w/in the JDK? (packages, threads, exceptions, garbage collection). How well would you fare on a *real* operating system (say Linux, or [your favourite UNIX variant here]). As the previous poster stated - it's all about sanity; well, for me it boils down to *readiblity*. Developing an understanding of why it's nice to declare a local variable akin to the Class type, but in lowercase comes from significant experience of coding Java, reviewing other's Java code, and learning from your mistakes along the way. It's not meant to be immediately embraced by newbies.

      I do appreciate the topic the original poster presented - I think I might use it when I need to inteview the next batch of script kiddies.
      Who needs case sensitivity in Java? Serious programmers, that's who.

      ObJava: Back in the pre J2SE days, I used to love when interviewees would tell me they love Java because "Java doesn't use pointers!" (one of it's early evangelical "pros"). Minutes of silence would follow after I asked them to explain the existance of java.lang.NullPointerException

  11. readability by retards · · Score: 5, Insightful

    In my opinion, case senssitivity allows for more readable code if using long variable or method names .

    For instance:

    MySteadfastObject.doSomeReallyBizarreParsing()

    instead of

    mYSTEadfasoBJEct.DOSomerEAllybizaReparsiNG()

    Emphasizing readability instead of easy-writing is (mostly) a Good Thing (TM).

    1. Re:readability by Chilles · · Score: 1

      readability has nothing to do with case sensitivity. Code is kept readable by programmers that use sane variable names and, the occasional uppercase letter.
      In a case sensitive environment this:

      MySteadFastObject.doSomeReallyBizarreParsing()

      Would produce an error because you actually meant to type this:

      MySteadfastObject.doSomeReallyBizarreParsing()

      But your head got in the way and parsed "fast" as a separate word that should have it's own uppercase letter. The only proper reason for case sensitivity is portability. MySteadfastObject and MySteadFastObject look the same to humans and a case insensitive compiler but in a binary file they are not the same. And if you'd open a file containing both on a system that uses some other character map than ASCI you'd be in real trouble if you wanted to get the code to compile (or even read it for that matter).

    2. Re:readability by Scarblac · · Score: 1

      That's nice, but doesn't really have anything to do with the issue. You can do the second thing in a case sensitive language (but you have to be consistent with it), and you can do the first thing in a non-case sensitivie language.

      I think the only plus for case sensitivity in Java is the Object object = new Object() meme - difference between the class and an instance. I doubt whether that is worth it.

      On a related note, I also think case sensitivity in the Unix file system sucks.

      --
      I believe posters are recognized by their sig. So I made one.
    3. Re:readability by Njovich · · Score: 1

      You could always use the underscore for that - it's used in more than a few language standards:

      my_steadfast_object.do_some_really_bizarre_parsing ();

      Arguably it's more readable too, and just as enforcing. I really don't have any problems with case-sensitivity though.

    4. Re:readability by Anonymous Coward · · Score: 0

      I also think case sensitivity in the Unix file system sucks.

      No way! i can't believe the retardedness of the ridiculous DOS legacies of case-insensitivity and the even more retarded 8.3 file naming system.

    5. Re:readability by Scarblac · · Score: 1

      Now you're mixing things. 8.3 has nothing to do with this.

      Name me ONE instance where it was nice in Linux that the file system was case sensitive.

      --
      I believe posters are recognized by their sig. So I made one.
    6. Re:readability by BigBadDude · · Score: 1

      let me think...aha

      "X"

      is your answer

    7. Re:readability by Scarblac · · Score: 1

      Just guessing here...So you have two different executables names Xconfigurator and xconfigurator or so, and you can't live without giving one another name?

      --
      I believe posters are recognized by their sig. So I made one.
    8. Re:readability by KagatoLNX · · Score: 1

      When doing large directory lookups for one. In a case insensitive system, searching is much slower.

      When given an open call for, say, "my document.txt", you have to match for all possible case permutations of that string. That's 2 ^ length of the string possibilities.

      There are tricks you can pull to keep this faster (linear but five times slower than a straight comparison, or precompute some data for inconstant calculation loads), but the point remains that you end up with a bunch of weird and buggy macros to implement what should be a simple lookup.

      If you don't believe me, make a program that randomly generates 100,000 test strings of variable of length, then searches it for a value (and doesn't find it, since misses are the worst case in this scenario). Now change your strcmp to stricmp. Notice the difference. Imagine it in the kernel--on every file lookup.

      This is not an insignificant problem either. Mail servers are the first place this would suck. Maildirs, for example, require frequently searching dirs with many files. More critically, mail servers rely on being able to walk their queue directories effectively. Same thing for various other queuing services (HylaFax comes to mind). "Just make it case insensitive to make it easier" sounds benign, but a byte-for-byte comparison is simply faster and always will be.

      Also, keep in mind that VFAT saves the case information, it just doesn't use it. I actually kind of like being able to use it. Especially in extensions. Discerning between .c for C and .C for C++ has always been a (IMHO useful) convention on unix.

      Besides, I just don't buy the argument.

      a> Case-sensitivity keeps you from being sloppy
      b> My cute IDE keeps me from being sloppy, the language shouldn't stop me!

      What do you care about the language if the IDE takes care of it? Besides, you're making an argument for being sloppy. Best case, at least it's an argument against typing what you mean. This is just like imprecision in language. I may know what you mean if you use "ain't" when you mean "won't", but it is still better to use the correct words for obvious reasons.

      --
      I think Mauve has the most RAM. --PHB (Dilbert Comic)
    9. Re:readability by sql*kitten · · Score: 1

      In my opinion, case senssitivity allows for more readable code if using long variable or method names .

      Preserving case in the source code (which is just a text file) and being sensitive to case in the the compiler are two wholly separate matters. There's no reason you can't have both.

      I too think that case-sensitivity is overrated. It only came about because back in the early days of Unix they didn't have the spare CPU cycles to do case-insensitive string comparison all the time (Unix had to support mixed case in text because ones of its earliest uses was typesetting) so they made a virtue out of a necessity.

    10. Re:readability by PainKilleR-CE · · Score: 1

      Many coding standards have exceptions and special cases for using underscores, so after a few years using numerous languages with different groups of people, you may find yourself avoiding using them in code altogether, unless it's part of a library you're calling somewhere.

      --
      -PainKilleR-[CE]
    11. Re:readability by BigBadDude · · Score: 1


      no!!!

      i mean X as in xfree86 you I***T :)

      how fun is it to call it just "x"?

      its like calling DOOM III for d3,
      not very impressive anymore, hah?

      BTW, Xconfig and xconfig are two very distinct utilities...

    12. Re:readability by buysse · · Score: 1
      i18n. Take a disk from a machine running Linux with character sets. Place in your computer, and attempt to read in a sane way. The *world* doesn't all use ASCII. Sorry. Each character (in binary) may have a different meaning in another language character set, and there's no direct case-insensitive compare that can work on Japanese along with French (think non-ASCII accents) and straight ASCII.

      Oh, and just because you program in English does not mean that another person would. USians and the Commonwealth states are not the only ones who program.

      --
      -30-
    13. Re:readability by dubl-u · · Score: 1

      readability has nothing to do with case sensitivity. Code is kept readable by programmers that use sane variable names and, the occasional uppercase letter.

      Good start, but take it a little farther.

      If you add case sensitivity, then the programmer who designed an object can be sure that people using his object will follow his conventions for capitalization.

      This is good in two ways: It makes it harder for somebody sloppy to get away with being sloppy. Also, it gives people who design objects an incentive to be a little more thoughtful; if they screw up on the variable names, they will get unhappy feedback from the users of those objects.

    14. Re:readability by bar-agent · · Score: 1

      If you add case sensitivity, then the programmer who designed an object can be sure that people using his object will follow his conventions for capitalization.

      This is bad. Code conventions aren't global, they are local. Each shop has their own. Why should I be forced to use your convention? It's the wrong convention! It doesn't match any of my other code!

      WTF does the original programmer care if I'm using his converntion or not? Why would he even want to enforce that?

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    15. Re:readability by bar-agent · · Score: 1

      It is not good practice to name an instance the same as the class. Instances should be named for their purpose.

      "Point translatedPoint" instead of "Point point".

      Languages should be case-insensitive to enforce good practice.

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    16. Re:readability by bar-agent · · Score: 1

      Xconfig and xconfig are two very distinct utilities... ...and this is a bad thing.

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    17. Re:readability by bar-agent · · Score: 1

      The Dylan language allows the hyphen in names:

      my-steadfast-object.do-some-bizarre-parsing

      It is very readable. You have to put spaces around the hyphen in expressions, but most people do that anyway.

      Dylan is case-insensitive, by the way. It distinguishes "constant" versus "class" versus "instance" like so:

      $pi-squared
      <string>
      foobaz

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    18. Re:readability by Anonymous Coward · · Score: 0

      I know I'm an AC responding to an old comment, but what the hell.

      Why would you test for every permutation in the string? If we know that the system is case insensative:

      if lowercase file_a equals file_b then
      files_match
      end if

    19. Re:readability by dubl-u · · Score: 1

      This is bad. Code conventions aren't global, they are local. Each shop has their own. Why should I be forced to use your convention? It's the wrong convention! It doesn't match any of my other code!

      I was referring mainly to local conventions. When I'm working on a team, I work hard to make sure my objects serve as good examples for everybody else.

      But if one is publishing code to the outside world, it's good to do it in a fashion that works with common conventions. In Java, for example, almost all the published code I've seen uses most of the standard Sun style, especially for naming.

  12. Java can also correct this with an editor! by BoxedFlame · · Score: 5, Informative

    I strongly recommend you look at IntelliJ's IDEA editor for java. It will do the case fix if you make a mistake.

    Personally I prefer case sensitivity iN ALL LanGUagEs, inCludDinG jAVa bUT AlSo IN eNGlish.

    1. Re:Java can also correct this with an editor! by TwistedGreen · · Score: 1

      w00t, t|-|4Tz 133T d00d.

      I propose that Java also be made l33t-insensitive, so that, for example, foo = f00 = fo0 = phO0 = F0o and bar = b4R = B/\r = b@|2.

      f()O F0o = new ph0O(b@|2)

    2. Re:Java can also correct this with an editor! by bay43270 · · Score: 1

      I love IDEA, but I have also in the past use Visual Basic (maybe I should post this anonymously). The feature he's talking about isn't same thing as refactor/rename. In Visual Basic, it corrects the case as you type. Since ClassName and className can't exists independently in Visual Basic, the IDE can safely change the case of one to match the other. It's been a few years, but I think it uses the case of the field declaration.

    3. Re:Java can also correct this with an editor! by BoxedFlame · · Score: 1

      IDEA does exactly what I suggested it did: correct as you type. Maybe you have this turned off?

    4. Re:Java can also correct this with an editor! by bay43270 · · Score: 1

      I think I know what your talking about now. If Idea knows the context of what your typing, the code completion dialog comes up. The code completion feature will correct your case, if everything else is correct.

      For example, a class has a field called foo. Typing 'this.fOO' will bring up the code completion. After typing the space character at the end of the word, the reference will change to 'this.foo'.

      If you are referencing the class in a static context (MyClass.MY_CONST), typing MyCLASS gets you an error (unless you force code completion with ctrl-space). 'MyClass.my_const' invokes code completion and changes the code to 'MyClass.MY_CONST'.

      If you don't specify the context, it doesn't work either (unless you force it to start code completion by pressing ctrl-space). In the first example 'fOO = 12;' will not automatically correct to 'foo = 12;'. I assume, this is because it would have to search your entire scope and make a guess as to what you meant. In VB, no case sensitivity means no guessing.

      So, IDEA does have some useful features, but they don't do the same thing as VB does. The limitations are probably based on the language, but if there is a way around it, the Jetbrains people will find a way.

    5. Re:Java can also correct this with an editor! by John+Harrison · · Score: 1
      Try Eclipse. It is FREE and has auto-completion and makes good suggestions for ways it can auto-correct errors. So if you type something that has the wrong capitalization it will flag it as an error and can auto-correct with two clicks.

      I too have used VB and it is an evil language. The only nice thing about it is the IDE and Eclipse is far superior in that regard as well. IDEA is probably better too, I haven't tried it though.

    6. Re:Java can also correct this with an editor! by bay43270 · · Score: 1

      Once again, that isn't as useful as what VB does. It requires user interaction. This isn't a shortcoming of Eclipse. A user decision is necessary because Java is case sensitive (but you would have understood that, had you read my previous post).

      I do use Eclipse from time to time, to see how close it is to catching up to IDEA. It's a very good IDE, and I recommend it to people on a regular basis. I personally still prefer the extra polish of Idea, and plan to pay the $250 for the 4.0 upgrade when it's released.

    7. Re:Java can also correct this with an editor! by John+Harrison · · Score: 1

      I agree that at first blush it seems like it is not as useful. However I think that case sensitivity is itself a useful feature. Eclipse also will flag violations of Java's case sensitivity rules, so that a class must begin with an uppercase letter and a variable must begin with a lowercase variable. I don't see how VB's laizze faire attitude towards such things is "better". It is simply easier for those who haven't yet realized the benefits of consistency and being disciplined.

  13. Re:An argument for case-sensitivity by Bluetrust25 · · Score: 5, Interesting
    There was a great post on this subject on comp.lang.c back in 1989 by an academic named Rahul Dhesi:

    Why languages should be case-sensitive:

    People may use |COUNT| and |count| to mean the same thing, but mathematicians don't. In mathematical expressions it's very useful to use case distinctions for related entities. For example,

    Consider a graph G(V,E)

    for each vertex v in V do
    find an edge e in E such that e is incident on v ...

    Since programming languages are meant for use by technical people, and since computer programming and mathematics are so intimately related, it pays to let computer programmers use the same tools that mathematicians do. Not only should programming languages be case-sensitive, but they should allow the use of subscripts, superscripts, and Greek letters too, to make the notation more powerful and more intuitive. Right now we have to go through some trouble to compact mathematical notation to a verbose format just because the computer's character set is so inadequate.

    Link to the original post

    ...And that's why you should sign up for free hosting with aloofhosting.com.

  14. We're not all idiots by ed_g2s · · Score: 1

    Sure case sensitivy does make VariablesEasierToRead, but don't most programmers do that anyway? When was the last time you saw a stuPiDLYcapITAliZeDVariAbLe? It should be up to the programmer to choose his own naming conventions, including the capitalization, instead of assuming they doesn't know how.

    1. Re:We're not all idiots by KDan · · Score: 1

      Certainly not. You'd be surprised by how many programmers actually ARE idiots (just looking at the code I have to work with, I'd say quite a large percentage...). Standards are there to help other people understand your code. They should most definitely not be up to you.

      Daniel

      --
      Carpe Diem
    2. Re:We're not all idiots by m4rcL · · Score: 1

      The whole point of a naming convention is that your convention is the same as my convention. This means if you need to read my code for some reason you can easily fit in with where a Class appears and where a var appears. Maybe I decide to use CAPITAL_LETTERS for any public field whereas everyone else is using it for a constant. Confusion ensues. It's the out side of Postel's Law. When you're writing code you should take the time to make your code use a sensible naming convention. Case-sensitivity is just one way the compiler can encourage you to pick a good one.

  15. Case-insensitive programming languages? Yuck. by LizardKing · · Score: 4, Informative

    Having had the pleasure of maintaining some Fortran code that was decidedly haphazard when it came to case consistency, all I can say is thank God C and Java are case-sensitive. The only reason languages like Fortran are case-insensitive is because punch cards and many early terminals only had uppercase characters. This enforced a consistency in case, but once terminals with full character sets became common I'm sure legibility of code became an issue.

    Relying on an IDE to correct your sloppy coding by enforcing case consistency is a dubious idea. An IDE can have many positive features - syntax highlighting of errors, automatic indenting - but it shouldn't automatically "fix" errors. Sooner or later the IDE will make the wrong decision about how to fix a programmers syntax error, leading to potentially subtle and hard to find bugs.

    Chris

    1. Re:Case-insensitive programming languages? Yuck. by Smidge204 · · Score: 1

      The problem with that argument is, in a case-insensative language, mixing up the case isn't an "error". Sometimes it actually helps to eliminate errors because when it corrects the case you know you didn't typo it.

      I program in both VB and PHP. One of each style. I also use Option Explicit in all my VB modules, which removes the default loose-casting variable types. (I am not aware that PHP has any such feature) This means I explicitly declare each variable with the case I want for readability. I then type out my code without worrying about case and let the IDE "make it pretty". If it fixes the case I know that I'm using the variable I want it to use. (If I'm really careless and I still get a typo in there, then VB will error when compiling because the typoed variable is not declared.)

      Unfortunately PHP isn't the same way. Sometimes I might slip and type $MyvAr instead of $MyVar,and the code will compile fine but generate bad output because "$MyvAr" is a perfectly valid variable. Then I have to wade through page after page of code to find it because notepad's "Search" function isn't case sensative!

      There's just no justifyable need to have $foo and $Foo in the same scope, except for personal, ingrained preference to coding style. That's really what it comes down to - "this is the way I learned so that's the way I think it should be".

      I see a lot of discussion about case-insensative code being ambiguous, but how can you expect someone else to understand code written with $xxx $xXx $Xxx and $XXx all on the same line without developing a drinking problem? With all the billions of possible variable names you have available you can't think of anything unique?

      And for the record, VB doesn't "fix" syntax. It'll highlight it, and it will provide syntax help as you type (Tooltips with example syntax and dropdown menus for member lists and such), but you still have to actually type it right.
      =Smidge=

    2. Re:Case-insensitive programming languages? Yuck. by KagatoLNX · · Score: 1

      Bloat. Case-insensitivity creates a large bottleneck in compiling. Seriously. Every symbol comparison requires special handling. Ostensibly, it's no worse than lowercasing and doing a byte-for-byte comparison. However, that's a large linear overhead (in time AND memory) at each comparison.

      Comparing PHP to VB is interesting since VB has a pretty IDE and you're doing PHP in Notepad! Write your VB in Notepad for a month and then call me.

      Ironically, you just made an argument for me anyways. Your problems in PHP are PRECISELY your aforementioned problem. You've got the "this is the way I learned so that's the way I think it should be" thing going. You learned you could ignore it in VB but now you can't in PHP (with Notepad) and you whine.

      I'm sorry, I've always programmed case-sensitively and never had a problem with it.

      Now, as to which one is better? I pick case sensitive because it keeps the code simple, to the point, and fast. Libraries and tricky language features can mitigate the above to an extent, but at some point you have to concede that this "feature" makes things slightly easier for you at the expense of significant complexity. And unlike language features like a Virtual Machine or Garbage Collection, the benefits are much more . . . dubious. Also unlike the aforementioned, this feature hurts MORE with large projects--not less.

      Then again, with language experience like VB and PHP, I doubt you've ever had to maintain an extermely large project (thing at least 5,000 source files with 300,000 lines of code). No offense, but it's nearly impossible to pull that off with VB and PHP. Although those who do have earned my respect. ;)

      --
      I think Mauve has the most RAM. --PHB (Dilbert Comic)
    3. Re:Case-insensitive programming languages? Yuck. by LizardKing · · Score: 1

      I see a lot of discussion about case-insensative code being ambiguous, but how can you expect someone else to understand code written with $xxx $xXx $Xxx and $XXx all on the same line without developing a drinking problem?

      If someone coded in a case-insensitive langauge and were sloppy enough to use those four identifiers for mean the same thing, then I would soon be resorting to a global search and replace in the hope of making things a little more consistent. The fact that identifiers were so inconsistent would suggest to me the overall code quality make a rewrite likely anyway ...

      In languages like Java (which the article submitter cited as an example), Foo and foo are useful as distinct identifiers. Consider the following example:

      Foo foo = new Foo();

      This is a very common idiom, not just in Java or C++, and preferable to:

      Foo my_foo = new Foo();

      In fact, my employer has an American subsidiary where the programmers (ex-VB and Windows people) do use the second style of syntax - instances never have a lowercased or camelCased version of the Class name. They also prefix data members with "_", perhaps a hangover from VB (does VB allow local variables that mask those with a higher level scope? I've never used VB myself, but it would explain the practice). This style makes their code very tiring to read.

      Unfortunately PHP isn't the same way. Sometimes I might slip and type $MyvAr instead of $MyVar,and the code will compile fine but generate bad output because "$MyvAr" is a perfectly valid variable. Then I have to wade through page after page of code to find it because notepad's "Search" function isn't case sensative!

      You use notepad? Get a decent editor for fscks sake. Don't try to blame your shortcomings as a programmer, or your use of inappropriate tools on the programming language.

      And for the record, VB doesn't "fix" syntax. It'll highlight it, and it will provide syntax help as you type

      I just inferred that that VB auto-fixed things from the wording of the article. As I say, I've never used it myself.

      Chris

    4. Re:Case-insensitive programming languages? Yuck. by lafiel · · Score: 0, Flamebait

      I'm going to cut right to the chase, with language experience like VB and PHP, you're not going to get much sympathy from anyone.

      The first reply to you padded this nicely, I'm not going to.

      Learn some languages that wouldn't get you laughed at by the majority of programmers in the world. VB is a running joke for any computer science student, much less established programmers.

      And PHP's incosistencies within it's own language has it pushed into the background, only those looking for ease of use will bother with PHP. If you're going to be writing anything robust, you're better off scripting it via Perl(just as an example, cgi scripting rules and Perl was the first thing that came to mind).

      I program in both VB and PHP

      What a joke. You made me laugh so hard there I almost stopped reading your comment.

      PS. I got karma to burn. And burn it probably will.

    5. Re:Case-insensitive programming languages? Yuck. by PainKilleR-CE · · Score: 1

      Unfortunately PHP isn't the same way. Sometimes I might slip and type $MyvAr instead of $MyVar,and the code will compile fine but generate bad output because "$MyvAr" is a perfectly valid variable. Then I have to wade through page after page of code to find it because notepad's "Search" function isn't case sensative!

      That's not even truly a question of case sensitivity, it's an argument for requiring variable declarations, which is exactly what you do when you set the explicit option in VB. If you have to declare your variables and try to assign to $MyvAr when only $MyVar is declared, the compiler should complain, or at the very least warn you.

      There's just no justifyable need to have $foo and $Foo in the same scope, except for personal, ingrained preference to coding style. That's really what it comes down to - "this is the way I learned so that's the way I think it should be".


      $Foo $foo = new $Foo(); as most have already pointed out. Or, to make it more obvious:
      int Int = 0; (or int Int = new int();)
      which is obviously better for a variable with small scope and little use than
      int x = 0; (or int x = new int();)
      because at least you know what the variable is by looking at it, rather than hunting down the definition of x (though good coding will put the definition at the beginning of it's scope and good IDEs will give you a "Go to definition" option).

      --
      -PainKilleR-[CE]
    6. Re:Case-insensitive programming languages? Yuck. by Anonymous Coward · · Score: 0

      > Write your VB in Notepad for a month and then call me.

      It's called ASP.

      Even assuming that case-insensitive symbols are the huge overhead you claim, it's all handled at compile time (or in BASIC-speak, "tokenization") anyway.

      I've done 100K+ lines of ASP and, given a decent class structure and programming standards, it's not so bad. VB can be used as if it were Java's retarded cousin.

      (Posted Anon for obvious reasons!)

    7. Re:Case-insensitive programming languages? Yuck. by mdielmann · · Score: 1

      You've clearly never used a case-aware IDE for a case-insensitive language. I have, and have seen the good and the bad from them.

      First, given that the language is case-insnesitive, improper case is not an error, by definition. Hence, there is no error-correction taking place. Keep in mind that this is exactly as important to a case-insensitive language as whitespace is to C, aesthetic only.

      Second, given some simple rules, case consistency is very simple to maintain - if you have a perfect memory and a complete reference of the code being written to review. My computer has both. When do you set the case requirements in C? When you declare the variable. Why do you think the computer couldn't do a search for the correctly referenced variable, and set the case to match what is found in the declaration?

      Now, like I said, I've run into problems with case-matching before. The biggest one is that all references of the variable, etc., are reset to match the last instance you typed. This happened most often with undeclared variables (a BAD THING (TM), but I don't always write the code I have to maintain), and a few other circumstances that I couldn't figure out the reasons for. Fortunately, there's a simple fallback if this occurs: Type the code how you want to see it, exactly as if you were programming in C.

      --
      Sure I'm paranoid, but am I paranoid enough?
    8. Re:Case-insensitive programming languages? Yuck. by Anil · · Score: 1
      Then again, with language experience like VB and PHP, I doubt you've ever had to maintain an extermely large project (thing at least 5,000 source files with 300,000 lines of code). No offense, but it's nearly impossible to pull that off with VB and PHP. Although those who do have earned my respect. ;)

      Not to completely disagree with your main point (I'm a C/Java/C++ programmer and dislike using/maintaining case insensitive code), but it actually isn't too hard for a PHP/JSP/ASP site to get an extremely large file count. Look at some of the huge websites out there. Then figure how many includes, etc. make up each actually viewed page and remember that a lot of people don't understand the concept of code re-use.

      The reason that this seems like less of an issue in some languages can be related to scope. Namespace collision isn't much of an issue on a 1000 file project if you don't have to worry about variable collision with another file or library.

    9. Re:Case-insensitive programming languages? Yuck. by perlfool · · Score: 1

      I really hate it when VB fixes the case of variables.

      You really start to see problems when your code is under configuration control.

      Say you are using MSXML in your project and you use something like dom.xml in a number of locations. Now you decide to add a variable called "Xml". Once you "Dim Xml", all of the properties in "dom.xml" convert to "dom.Xml" thru the whole file. When you have multiple developers making changes and someone makes a change, like this somewhere, when you checkin a single line of code, there are lots of changes that you didn't make. The only way to get them back to the way they were before is to type in "Dim xml" (or whatever case you want) and it switches everything to that case (then remove the "Dim xml").

      All quite fun. Thanks MS.

  16. Mistakes easier? by profet · · Score: 5, Interesting
    It simply makes typing it in harder, and mistakes easier


    easier??? If anything it makes mistakes harder. Java is a very strict language syntax wise and will probably error out on compile if you have a syntax error.

    Now lets think...what would happen if it didn't error out because of case sensitive erors? Wouldn't that make it "easier" to make mistakes?
    1. Re:Mistakes easier? by LizardKing · · Score: 3, Insightful

      Now lets think...what would happen if it didn't error out because of case sensitive erors? Wouldn't that make it "easier" to make mistakes?

      This set me thinking. The guy who posted the article would probably prefer Perl to Java. It is case sensitive, but will let him get away with his sloppy coding practices by simply creating a new variable every time it encounters one which only differentiates from another in case. Then once he's learnt the error of his ways, he'll either return to Java with a greater appreciation of it's reasonably strict syntax, or become a fan of "use strict;" ...

      I remember reading the Jargon File entry on "discipline and bondage" programming languages, which was quite disparaging about them. I found myself in wholehearted disagreement with that attitude, as most programmers I work with need to have discipline imposed on them - coding standards, style checkers and peer review help, but the quality of C code seems to generally better than Perl or C++ simply because the language is much smaller and narrowly defined.

      Chris

    2. Re:Mistakes easier? by TobascoKid · · Score: 1

      Now lets think...what would happen if it didn't error out because of case sensitive erors? Wouldn't that make it "easier" to make mistakes?

      Exactly how would case sensitivity make the blindest bit of difference to syntax errors? As long as the language recognizes that keywords such as Class, CLASS and clASS are all the same and seeing as you declare variables beforehand anyway (so it can tell that myVar, Myvar and MYVAR are all the same), then tell me how does case sensitivity reduce syntax errors?

      Tk

      --
      At some point, somewhere, the entire internet will be found to be illegal.
    3. Re:Mistakes easier? by holy+zarquon's+singi · · Score: 1

      But only if you're a sloppy coder. It is said that the only people who really don't need to : use strict; are people like Larry Wall, and they do so anyway.

      --
      "...we should just trust our president in every decision that he makes and we should just support that." B.Spears 2003
    4. Re:Mistakes easier? by LizardKing · · Score: 1

      The sad thing is that the vast majority of coders seem to be sloppy, at least in a corporate environment. Staff turnover has been so high in the IT industry, that many people don't take pride in their work - it's the "I wont be around when it needs fixing or extending" mentality. While I'm not the most sophisticated programmer in the world, I put in the extra effort to ensure that my code is as clear and concise as possible. I don't comment my code extensively, just a brief description of a function or methods purpose and those sections where a quick read of the code doesn't make it obvious what I'm trying to accomplish. I'm also a big fan of Doxygen for C/C++, as well as JavaDoc and Checkstyle (http://checkstyle.sourceforge.net/) for Java.

      Chris

    5. Re:Mistakes easier? by Prior+Restraint · · Score: 1

      Interesting choice of example, because in Java, "class" and "Class" are different.

    6. Re:Mistakes easier? by dubl-u · · Score: 1

      most programmers I work with need to have discipline imposed on them

      Quick tip from one who has tried: imposing discipline on programmers doesn't work in the long run. It doesn't scale; as soon as you stop doing the imposing, they stop doing the discipline. Instead, structure your environment such that they are faced with the pain of their screwups promptly and frequently.

      For example, if you give a programmer a particular area of the code that is their own domain and that only they work on, then they have months in which to repeatedly screw up without apparent consequence. Worse, it's so much work to clean up the mess that they're generally allowed to get away with it.

      But if you do code reviews, you can reduce that time to a week or two. Add collective code ownership and short iterations and you can get it to days. Add pair programming and you can shorten the feedback loop to minutes.

      You should especially favor techniques where peers are the ones doing the bitching, rather than management, and where their complaints are about practical things. Consider how you'd feel hearing a manager say, "You have violated the coding standard that a consultant told us we should follow. Go back and clean it up." Now consider how you'd react to a guy on your team saying, "Dude, I'm trying to extend that code you wrote yesterday and I can't make heads or tails of it. Could you help me clean it up?"

    7. Re:Mistakes easier? by scrytch · · Score: 1

      Ahem. Re-read the entry on "discipline and bondage". You'll see that C is precisely not the sort of thing they're referring to. They're referring to languages that don't give you enough rope to hang yourself because they've used up all that rope tying you up and making you conform to their idea of architectural purity. A language that operates at the same level as C but doesn't give you pointers or bitfields because they're "icky" would be an example of a B&D language (Java doesn't need pointers because its "platform", the JVM, doesn't require them ... though one could argue the java platform is indeed into BDSM)

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  17. SetSlower != SetsLower by Tune · · Score: 5, Insightful

    - SetSlower is a procedure that reduces the speed
    - SetsLower is a function that gets a lower bound in a set of sets

    These are completely unrelated identifiers which are rendered equivalent by BASIC and other case-insensitive languages. It may look like a stupid example, but I've been annoyed on several occasions by misinterpreations of VB code that were caused by case-insensitivity. As a C/C++/Prolog/Haskell/Modula/... -coder I'm probably biased toward liking case-sensitivity, but I can't see why liking case-insensitivity should be objectively better; be more than just a bias.

    --
    What is wanted is not the will to believe, but the will to find out, which is the exact opposite -- Bertrand Russell, "Skeptical Essays", 1928

    Therefore, lets leave this issue as it is until someone comes up with good arguments to choose either one or the other.

    1. Re:SetSlower != SetsLower by Meowing · · Score: 1
      • SetSlower is a procedure that reduces the speed
      • SetsLower is a function that gets a lower bound in a set of sets

      A counterargument is that both might be more clearly written as set_slower and sets_lower (add studlycaps to taste).

      One place where I would miss case sensitivity is where FOO() is the macro version of function foo(). Admittedly that's fairly weak stuff and the world wouldn't end without the ability to do that.

      A better argument for keeping sensitivity might be in programming languages that allow names with a larger character set than ASCII. In something like Unicode where different languages are sharing character codes, case insensitivity is bound to do something unexpected and weird sooner than later.

    2. Re:SetSlower != SetsLower by Tune · · Score: 1

      >In something like Unicode where different languages are sharing character codes, case insensitivity is bound to do something unexpected and weird sooner than later.

      True. Moreover; I've had some really hard-to-track bugs involving case-insensivity combined with automatic character conversion while interfacing identifiers between different systems, where for example an umlaut (dieresis) was simply ignored by some part of the system ('u'=='&Uuml;'=='UE'==...) while it was relevant to another.

    3. Re:SetSlower != SetsLower by Scarblac · · Score: 1

      - SetSlower is a procedure that reduces the speed
      - SetsLower is a function that gets a lower bound in a set of sets

      I could argue that this is actually a disadvantage of case sensitivity, since it makes this sort of error-prone situation possible. Especially if they're in the same module so that this could be a problem, then a compiler error is just the clue you need that you should give them clearer names (like getLowerBoundInSets).

      That is: Relying on case sensitivity for differentiating between function names is a bad idea anyway, so allowing it is a disadvantage.

      --
      I believe posters are recognized by their sig. So I made one.
    4. Re:SetSlower != SetsLower by Anonymous Coward · · Score: 0

      I hate typing the frigging _ in my identifiers. It's not like that character is convenient or anything.

    5. Re:SetSlower != SetsLower by lux55 · · Score: 1

      Not that this invalidates your example, which I do think is sufficient to show the problems with case-insensitivity, however wouldn't it be more prudent as an API writer to keep your tense the same in both functions, which would make them:

      - SetSlower
      - SetLower

      Now they're more consistent, and don't conflict in any language (even case-insensitive ones like VB, PHP, etc.).

    6. Re:SetSlower != SetsLower by Anonymous Coward · · Score: 0

      As a C/C++/Prolog/Haskell/Modula/... -coder

      That is to say, graduate student.

      It always cracks me up when people invoke these languages that never occur outside of an academic setting.

    7. Re:SetSlower != SetsLower by Brento · · Score: 1

      - SetSlower is a procedure that reduces the speed
      - SetsLower is a function that gets a lower bound in a set of sets

      Ah! That explains why Java is so slow - everybody keeps using the wrong one, eh? I've always wondered what the deal is.

      --
      What's your damage, Heather?
    8. Re:SetSlower != SetsLower by inertia187 · · Score: 1

      GodIsNowHere != GodIsNowhere

      --
      A programmer is a machine for converting coffee into code.
    9. Re:SetSlower != SetsLower by Tune · · Score: 1

      >It always cracks me up when people invoke these languages that never occur outside of an academic setting.

      I guess I should have learned Cobol, right? Leaving C/C++ out, for the sake of the argument, I did two years of coding in Perl + Prolog at a full-text retrieval software company. Currently employed at a supply chain & logistics software company using a blend of C++ & Sicstus + constraint logic programming module.

      OK. I've never seen a mature OS written in Modula (some parts in Arthur appear to be, but that could harly be considered a mature OS, right?) and Haskell, Gofer, Miranda are probably just too hard for the average MSCE drone. But please stop whining about not being able to find a job that's more challenging than writing ASP, VB, Java, C#, PHP, Perl, Cobol... interfaces to some SQL database. If you feel your graduate diploma was a waste of time, please look around: There lots of good paying interesting jobs out there.

      --
      There are two ways of constructing a software design: One way is to make is so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. -- C. A. R. Hoare

    10. Re:SetSlower != SetsLower by Tune · · Score: 1

      My example may have been a bit excentric, but the SetsLower should not be read a verb "Set" (with +"s" for tense), but as a noun "Set" (with "+s" for plural, hence a set of sets). SetsLower would be a function that gets the lower bound (given some partial ordering) of sets in a set (probably better modelled as Sets.Lower). Get it? SetLower is not what I intendend in my example.

      Sorry I couldn't think of a better example. THe point I wanted to make, stands: with case-insensivity, two completely unrelated pieces of semantics may be forced to the same identifier. And since they are so unrelated, you may never notice the clash until you review you complete API through the eyes of the compiler.

      Never forget that a compiler should be primarily a tool to help developers, secundarily the other way around.

    11. Re:SetSlower != SetsLower by Anonymous Coward · · Score: 0

      No. I think:
      SetLower() would operate on a set.
      SetsLower() would operate on collection of sets.

    12. Re:SetSlower != SetsLower by PhilHibbs · · Score: 1

      If God had intended us to use MixedCase in our identifiers, then He wouldn't have given us the underscore_character.

  18. Conformance by cookd · · Score: 5, Informative

    I think the biggest reason is style enforcement. The reasoning goes something like this:

    1. Case distinction is room for additional information without increasing the length of the text.
    2. For the additional information to actually be useful, people have to know what the case distinctions mean.
    3. For people to know what the case distinctions mean, there have to be established conventions.
    4. Conventions fall apart very quickly if there is no enforcement or verification.
    5. It is useful to make the compiler perform some of the verification and/or enforcement -- you're much more likely to notice problems immediately if the problem is caught by the compiler rather than an optional LINT tool.

    It is a lot like case sensitivity for English. It really isn't needed, but it sure helps you understand things a lot more easily. You can scan for the start of the next sentence much more quickly if the sentence starts with an uppercase letter and the rest are lowercase. In the same way, you can get a quick sense of what a variable is for by observing its casing, assuming that you are familiar with the casing convention in use.

    English teachers force us to use proper spelling, grammar, casing, and punctuation so we can communicate more clearly. Computer language syntax works the same way. The parser/compiler could do a fine job with a much simpler language, and it doesn't really need to be that strict about syntax checking. ("Error: missing semicolon." If it knows there is a missing semicolon, why can't it just pretend the semicolon is there and go on?) The idea is that stricter syntax checking is useful to the original programmer (many syntax errors are also indicative of logic errors or ambiguity) and also to the maintainer who has to make sense out of the code.

    So the bottom line is that following coding conventions makes your code more readable and your intent more clear. Case sensitivity is one way the compiler helps you maintain your coding conventions.

    --
    Time flies like an arrow. Fruit flies like a banana.
    1. Re:Conformance by SnakeNuts · · Score: 2, Interesting

      I wholeheartedly agree with this point. Speed reading wouldn't be possible without case distinction. It's even easier in german, where every noun has to be captalized, so it's even easier to find the (possible) subject of a sentence. Or when you're trying to find names of persons in text, the fact that they start with capitals is damn useful. I find this the same with Java and C++. It just makes it easier to read.

      --
      Trainee BOFH -- Just give me your username & password
    2. Re:Conformance by orkysoft · · Score: 1
      ("Error: missing semicolon." If it knows there is a missing semicolon, why can't it just pretend the semicolon is there and go on?)

      Maybe because the compiler doesn't know where exactly the semicolon should have been placed?

      --

      I suffer from attention surplus disorder.
  19. Re:in Holland by tigersha · · Score: 4, Interesting

    This is actually a problem with java because Java states that thos packages must be in the correct directories:

    org.foo.Bar.bleh must be in org/foo/Bar
    org.foo.bar.Bleh must be in org/foo/bar

    This is NOT possible (unless they are in different section of the classpath) in Windows NT because the filesystem is not case-sensitive there. Java's mapping of case-sensitive package names to an underlying filesystem assumes that the filesystem has the same naming conventions that Java uses.

    As far as I know Java can also take Unicode source as input and then the filesystem must also handle that, which would work on NTFS, but not of FAT and probably not on any Unix FS AFAIK.

    --
    The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  20. Re: Who Needs Case-Sensitivity in Java? by Tux2000 · · Score: 0, Informative

    Well, if you prefer hacking non-case-sensitive code, just don't leave your Visual Basic and Windows playground and let adult programmers with a mathematical background work as they did since the computer was invented. If you really want a non-case-sensitive Java, just grab some free, open source Java implementation and modify it to be case insensitive. No one will stop you. But you do remember that Java source code is assumed to be Unicode, do you? And you remember that some Unicode characters are considered to be either upper or lower case, but have not exactly one corresponding lower resp. upper case character, do you? One simple example is the German sz ligature, but there are many more. In France, it is custom to leave out the accent signs on upper case letters, so toLower(toUpper(s)) is not equal to s.

    Tux2000

    --
    Denken hilft.
  21. So, request them to change it... by ivi · · Score: 2, Interesting

    I understand that the rules of the Java game
    are no longer in Sun's hands to control...

    There's some sort of community-input standards
    committee or working group to which you (or
    any/all of us here, even) can put the Suggestion
    that Java become case-insensitive.

    In fact, why don't we organise a -mass- sugges-
    tion campaign here to do just that.

    A bit like those spontaneous "Let's all meet
    at Macca's on 5th & Spring St (or wherever)"
    that turn out crowds of people, who've never
    even met before... on somebody's whim... ;-)

  22. Re:in Holland by GuyWithLag · · Score: 1
    Please read what I wrote, that case in identifier names has by convention semantic significance, so that you can discern just by the case of the identifiers the following cases:

    org.foo.Bar.bleh is the static variable named blex of the class Bar in the org.foo package, contained in the org/foo/Bar.java file.

    org.foo.bar.Bleh is the class Bleh in the org.foo.bar package, contained in the org/foo/bar/Bleh.java file.

    As you see, these are quite different, and in different places. But still, if a coder uses Foobar and FooBar as class names, yes, he will be in trouble in case-insensitive filesystems. As for the source issue you mention, it is really two issues:
    1. The encoding of the source files
    2. The encoding of the file names
    For the first I know that it uses the environments encoding IIRC on Unix by LANG or the locale.
    For the second, well, It seems to work just fine on a UTF-8 Linux environment with greek class names, but I don't know anything about Windows other than VFAT with long file names uses unicode.
  23. Easier to read by jgoemat · · Score: 3, Insightful
    Most languages have guidelines to show you how to capitalize identifiers. It is much easier for me to read code that way than if anyone could capitalize differently than the libraries were defined.

    Being case-sensitive AND following capitalization guidelines makes code much easier to read. I don't see any reason to allow the same characters with different capitalization to refer to different variables, but I definitely think any references to a variable or function should be capitalized the same way it is defined and that all keywords should be capitalized consistently.

  24. a few things by LittleBigLui · · Score: 1
    Firstly, case sensitivity makes the compiler's work easier, hence compiling is faster. Good thing, really, except maybe for HelloWorld.java ;)

    Another point: case sensitivty improves code readability by removing ambiguity. For example, the java practice of namingMethodsAndVariablesInCamelCase, starting with a lowercase letter and TheSameWithAnUppercaseStartLetter for classes allows a variable to have the same name as a class, which i often use in code like this:
    class SomeClass {
    private Something something;
    private Connection connection; //jdbc connection for this object
    private SomeOtherThing someOtherThing;
    //...
    }
    The case-sensitivity of java, combined with coding standards, enables me to do this. Obviously, something could also be named mySomething, but i find it much simpler and cleaner this way.

    And finally, the slippery slope argument: If we allow incorrect capitalization in code, what next? A compiler with automagic spellchecking and -correction?

    As Charlton Heston would put it: From my cold, case sensitive hands!
    --
    Free as in mason.
    1. Re:a few things by fyrie · · Score: 1

      I totally agree on the point about being able to name the var to be the same name as a class. I don't want to have to do this: private User theUser = new User(); I much prefer: private User user = new User();

    2. Re:a few things by __past__ · · Score: 1
      This is easily solved by having separate namespaces for different things. Scince it is clear what is a class name and what is a variable anyway, you could simply write user user = new user();

      I guess the real answer is that, for a user, it simply does not matter much whether a language is case sensitive or not. The differences are neglible. For an implementor case insensitivity probably makes things slightly harder, but not in a way that should require more work than putting a normalizeCase(identifier) here and there, so no big deal either.

    3. Re:a few things by nojomofo · · Score: 1

      No, you're getting into trouble now. What if the user class has a static method named init? Then when you do user.init(), it's entirely unclear (for both the coder and more importantly the VM) whether you're trying to init() the user class or the user object. Obviously, the person can figure it out but it's easier not to. And it would be a rather significant performance hit for the VM to support that.

    4. Re:a few things by buysse · · Score: 1

      If I remember correctly, in Java (and many other languages) the class name itself is an identifier or variable. That's certainly true in Python.

      --
      -30-
    5. Re:a few things by __past__ · · Score: 1
      In that case it depends on whether I can call a class method on an instance of the class or not. I have no idea if this is allowed in Java (but I guess that class and instance methods at least are in the same namespace, so that you cannot have a class and an instance method of the same name/signature), but some languages let you do this.

      Or just have explicit namespace operations. For example, to invoke a method on an object in Common Lisp, you would write (do-something-with some-object), to do the same on a class (which, of course, is a first-class object), it would be something like (do-something-with (find-class 'class-name)), or (do-something-with (class-of some-object)). CL classes have their own namespace, but yet there is little trouble.

      (On the other hand, Common Lisp should probably be avoided as an example in a discussion about case sensitivity...)

      It is a question of all language features, from case sensitivity to namespaces, general syntax and semantics, playing together nicely; it is generally not a good idea to change a single aspect of a programming language and expecting the result to be a consistent, better language.

  25. a cultural thing? by 12dec0de · · Score: 2, Interesting

    I believe that the wish for case insensitivity is a cultural thing, mainly craved for by those for whom english is the native language.

    In more than a few other (human) languages (yes there are others beside english) case conveyes difference in meaning, generally reducing redundancy and often ambiguity when compared to english. Now, those are aspects that should appeal to hackers.

    Also it probably is a windows centric idea to expect things to be case insensitive (or as the original poster pointed out have older roots in primitivity)

    Why would you reduce your name space by 50%?

    mfg lutz

    1. Re:a cultural thing? by platipusrc · · Score: 2

      It would actually be reduced way more than 50%...it would be reduced from hrm, 63^n ([A-Za-z0-9_]) to 37^n ([a-z0-9_]) where n is the length of the identifier and assuming letters and digits used in English and underscore are legal chars.

      --
      And the muscular cyborg German dudes dance with sexy French Canadians
    2. Re:a cultural thing? by the_womble · · Score: 1

      And in many alphabets (all the Asian langauges I know enough about) case does not exist - AFAIK it is a characteristic of alphabets descened from the Greek and Latin ones.

    3. Re:a cultural thing? by Daen+Kolarin · · Score: 1

      50% reduction? That's a little low I think. That would imply you only have two choices for any symbol, ie:
      SYMBOL
      symbol

      when you have case sensitivity for a six letter word you've got 64 possible symbols without changing the letters.

      what you're actually doing is reducing your alphabet by 26 characters when you make an english-based language case insensitive. This means you are not packing as much information into each byte of text, which translates into needing more text.

    4. Re:a cultural thing? by DLWormwood · · Score: 1
      And in many alphabets (all the Asian langauges I know enough about) case does not exist

      Know much about Japanese? They have both Katakana and Hiragana syllabaries that both represent the same sounds. Just as Roman scripts use case to make distinctions between normal and proper nouns, *kana is used to make a distinction between native and foreign words. (And sometimes, gender...)

      --
      Those who complain about affect & effect on /. should be disemvoweled
    5. Re:a cultural thing? by 12dec0de · · Score: 1

      I could not be bothered to do the proper math. So I made a save estimate. I am an engineer, not a scientist ;-)

  26. intellectual inertia by blackcoot · · Score: 1

    if you look at the languages from whence java sprang, you'll see that while a lot of the semantics came from lisp (not case sensitive, easy to get lost in a sea of parentheses), the syntax is almost entirely based on that of C/C++/Object C (fewer parentheses, case sensitive). people coming from those languages (and there are a lot of them) are used to having case sensitivity and are likely to start bitching long and loud if you ever take it away from them.

  27. Uhm.. by zeda · · Score: 1

    Quick guess:
    We need case sensitivity because the English language has two cases.

    I mean 'R' and 'r' don't look the same do they?

  28. Re:An argument for case-sensitivity by TobascoKid · · Score: 3, Insightful

    Since programming languages are meant for use by technical people, and since computer programming and mathematics are so intimately related, it pays to let computer programmers use the same tools that mathematicians do

    I only partly agree with this statement as I think there are two distinct types of programming - the technical, mathematical type and a far less mathmatical 'data processing' (ie pretty forms for putting data in databases) type of programming.

    With DP case sensitvity just gets in the way - the programmers may not be very technical and any maths used would probably only be complicated by use of the 'same' name for different variables.

    I think VB is definately in the DP category of languages and hence has no need for case sensitivity. As Java is often marketed as a DP language it's case-sensetivity is a serious drawback (at least as far as DP is concerned - in other areas of Java's use it may be usefull).

    Tk

    --
    At some point, somewhere, the entire internet will be found to be illegal.
  29. Re:An argument for case-sensitivity by fredrikj · · Score: 2, Insightful

    they should allow the use of subscripts, superscripts, and Greek letters too, to make the notation more powerful and more intuitive.

    I think this should be handled on the editor side rather than in the language. For example, you'd still name a variable sigma_1 but the editor would display it as a sigma character with subscript index 1. This has a great benefit: it maintains compatibility. People can work on the code even if they only have access to a regular text editor, and it'll be encoding-safe.

    It'd require strict naming conventions, of course, but people should use strict naming anyway.

  30. Because.... by dmorin · · Score: 1
    Ummm....beacuse they are two separate things to a computer? Asking a computer to treat 'T' the same as 't' is not a natural assumption like it is in a human - you have to put in extra code to make it do that. Therefore, you have slower compilers. While it might feel like the more natural path when trying to read your code aloud, it is definitely not the natural way of things.

    I also note that you realize English is case sensitive. You didn't have your all caps key on. Why are you not complaining about that?

    Like many posters have already said, taking case out of the equation takes out a bit of information that can be put to very good use in the language semantics (e.g. "All class names start with a capital letter", "static final constants are all caps", etc...)

    I think part of the problem with the question is that when people say "case insensitive" they're probably thinking to themselves, "all caps". Which would certainly cut down on some of the readability and consistency issues mentioned. The problem is that the two are not the same, and if you really do mean case insensitive you have to put up with things like pUblIc STatiC final INT FOo=0; That pains me just to write it.

    1. Re:Because.... by 91degrees · · Score: 1

      Asking a computer to treat 'T' the same as 't' is not a natural assumption like it is in a human - you have to put in extra code to make it do that. Therefore, you have slower compilers

      You just need to convert everything to lower case. Even a fairly slow implementation of this will only take a few instructions per character. Any PC less than 10 years old could process several megabytes in less than a second.

      I also note that you realize English is case sensitive. You didn't have your all caps key on. Why are you not complaining about that?

      the difference here is That while this sentence IS incorrectly capitalised, You will still be able to understand it. i could even do all lowercase, OR ALL CAPS, without slowing you down too much.

      Like many posters have already said, taking case out of the equation takes out a bit of information that can be put to very good use in the language semantics

      This is certainly useful though. I've been using this today. Something like "object" is a useful name for a variable of type "Object". This style of code isn't always advisable, but often useful.

      I think part of the problem with the question is that when people say "case insensitive" they're probably thinking to themselves, "all caps". Which would certainly cut down on some of the readability and consistency issues mentioned.

      I don't. I want all lower case, with the option of capitals at the start of a new statement, but without the compiler complaining if I don't bother.

      The problem is that the two are not the same, and if you really do mean case insensitive you have to put up with things like pUblIc STatiC final INT FOo=0; That pains me just to write it.

      Yeah, but would you?

      For example, all comments are totally case insensitive. I could add /*clASs tO HoLd GEnEric DatA*/, but why would I want to? Most people would still stick to a convention.

  31. Who needs case sensitivity? by Anonymous Coward · · Score: 0

    Right on! Let's get rid of case sensitivity!

    While we're at it, let's banish that pesky "pitch sensitivity" from the Chinese language. It would be SO much easier to speak if it didn't matter how you inflect the words. I'm tired of trying to compliment someone only to have them get all indignant because I told them their mother was a horse. :)

  32. Re:a cultural thing? -- like in German by anon+mouse-cow-aard · · Score: 1

    Where most Nouns are Capitalized by Everone. It is a good Thing. I always liked being able to find Nouns easily in a sentence.

    Verbs at the end is confusing though. You no Idea Phrase what about is, until Pile of Verbs at the end get to. It Holistic Sentence parsing make is.

  33. Case-sensitivity is useful by fredrikj · · Score: 1
    It is useful, for example, in Python. The accepted coding style is that variable names are lowercase and class names are CamelCase. The advantage of this is that you can have:
    class Object:
    #...

    object = Object()
    Which is cleaner and easier to type than:
    class ObjectClass:
    #...

    ObjectInstance = ObjectClass()
    1. Re:Case-sensitivity is useful by The+Bungi · · Score: 1
      Just to clarify:

      This is camel case: objectClass

      This is pascal case: ObjectClass

      Java popularized camel case. C# promotes pascal case. C is traditionally lower case with defines and macros normally being all uppercase. C++ is generally a mix of lower and pascal case with the odd UPPERCASE inherited from C, although that varies greatly from developer to developer.

      Ultimately it doesn't matter what style (because that's what this is, style) as long as you are consistent and I can understand your code by just looking at it.

      As to the usefulness of case sensitivity... well, I'd rather do this:

      Value value = new Value();

      than this:

      Dim MyValue As New Value()

      But that's just me.

  34. I hope someone will give a real reason later... by Hakubi_Washu · · Score: 2, Interesting

    Up till now every answer I've seen is either a) Because it's a tradtion, b) Because it's english, c) Because in Mathematics, we distinguish, or, simply, d) Because it's just better.

    With the possible exception of c) these are rubbish. a) Even if it were traditional (which it isn't, as some pointed out -> punch cards), since when do geeks care about old stuff??? A little nostalgia, but die-hard conservatism (in the sense of "to conserve")? b) Yeah, right, "MyObject.GetNumberOfReferences" sure is proper english capitalization... c) If I want to enter a mathematical expression directly as source, then this is a valid point. Notice the "if" however. There are usually some rather dirty hacks you can apply for speed anyway (remember back when multiplying by .5 was much faster than dividing by 2? Some of these still exist...), so I would consider myself a moron to quasi copy'n'paste without thorough rewrite anyway... d) Has never been an acceptable answer. So, what we have up to this point and in my opinion, is a number of prime examples for zealotism an flame-baits...

    OK, now for my POV: I started my programming at around 10 with M$-DOS Batch and QBasic, which I both consider very helpful tools today. Most Windows(TM) PC's I encounter still have QBasic installed and when I need to write a "script" fast on those, knowing these is saving me time I would otherwise spend installing a "real" compiler (So NO Basic-bashing please, it is very helpful and, in it's newer instances reoatively powerful. You have realized that even before "Visual" it was capable of functions, pointers, direct IRQ-addressing, including Assembler, etc.?). Later I learned C,Pascal,Java,Haskell,Prolog,C++, though some only superficially, because I needed those for university. As soon as my "Pascal"-Phase (during school, when my teacher knew nothing but that) I understood one thing: Some languages make writing them appear harder. Semicolons at every lineend, Case-sensitivity, etc. All stuff that the IDE, or even a sophisticated editor, could easily handle themselves, if the the compiler was build for that (So no "the semicolon is given instead of a CR/LF or CR, because of portability, etc."-argument. That is an argument for the _saved_ file, or, even more precise, for the one handed to the compiler...) I was willing to cope with those during C, because the raw power of it made it worth any unpleasancy during writing, but with Pascal it ended being just anoying and a PITA. Java was a final example of artifical stupidity, in my eyes. I understand that it's capitalization rules lead to better readability of the code (which could still be done via IDE-Correction. If a language has commands that only differ in one capitalization, as suggested before, but those command still have 30+ characters, then something is seriously wrong...), but the sheer length of most commands and names in Java is always an eyesore to me. Yes, I know we don't have memory limitations anymore, but I still prefer abbreviations. What's wrong with VARPTR? Is VariablePointer really better? Or is it merely more characters to write? Spoken languages are highly redundant, which is necessary to understand disturbed communication, but when writing code, that is _not_ any issue. Why should I prefer a language that makes me wish for auto-completion of its mile-long commands???

    I hope that my post gives the scale a nudge in the other direction...

    1. Re:I hope someone will give a real reason later... by Twylite · · Score: 2, Insightful
      1. An argument you missed is that upper/lower case is poorly defined for Unicode.
      2. Is VARPTR a Variable Pointer or a Variant Pointer? Is a "variable pointer" something that points to memory that can be changed (a variable), or a changable pointer? Does a "variant pointer" point to a variant variable, or can it be changed to point to different types of variables?
        Meaningful names are long to reduce ambiguity. It shouldn't be necessary to read the code to understand the intent of a variable or function.
      3. Most arguments for case insensitivity are that it is easier or less error prone. If you can't handle getting the case of a name correct, you almost certainly don't have the ability to manage checking parameters and states, or generally doing any of the work involved in writing quality software.
      4. Case sensitivity forces consistency. Interfaces are usually designed and approved by more experienced developers who pay the proper respect to naming ; a case sensitive language prevents the case from being changes, possibly confusing the meaning of the variable or function.
      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    2. Re:I hope someone will give a real reason later... by Hakubi_Washu · · Score: 1

      1. That's a Unicode Problem. As I said, that may be interesting for the data handed to the compiler, but not for the IDE.
      2. VARPTR is a Variable Pointer. Why shouldn't it be necessary to look something up in the documentary if you don't know your language well?
      3. That is an unproofed assumption. Consider the comparison with LaTeX for example. Just because you use a system that automagically formats your text nicely (maybe because you can't), does this imply that you can't write a good text?
      4. All-Upper-Case is as consistent. What's your point? I have never confused any variables for functions and vice versa, but that may be because I don't insist on naming things like "ThisIsAThingy" and "ThatIsAThingy"?

    3. Re:I hope someone will give a real reason later... by Zardoz44 · · Score: 1
      Up till now every answer I've seen is either a) Because it's a tradtion, b) Because it's english, c) Because in Mathematics, we distinguish, or, simply, d) Because it's just better.
      What's wrong with these reasons? This post and at least 10 others more than an hour before yours gave perfectly sane reasons why case-sensitivity is a good thing.

      I hope your post will give someone a nudge to smack you in the back of the head. What's wrong with "VARPTR"? Are you on drugs? Is this Variable Pointer? Veterans Affairs Reporter? VARP Tree (whatever a VARP is)? I DON"T KNOW ABOUT YOU, BUT I HATE READING ALL CAPS, ESPECIALLY WHEN READING IT IN CODE FOR 10 HOURS A DAY.

      Read-read the comments above your post and see if you can't find a good reason for case-sensitivty. I assure you, there are plenty.

    4. Re:I hope someone will give a real reason later... by YomikoReadman · · Score: 2, Informative
      For everything you've talked about here, not having to worry about it is all well and good. However, what you fail to take into account is that in the real world, where people get paid to write code for a living, and especially in cases where you might not have the same team of coders on a project over it's lifetime who will know what everything is and does. I currently work on a system that has been in use for around 10 years, and I can assure you that most of the original team no longer works for this company, let alone on the project.

      Bottom line is that while you may have a point in cases where the code will only ever be seen by the individual that wrote it in the first place, in cases where the software will go through a full life cycle and eventually become a sustainment system makes readability and understandability an absolute necessity, otherwise you'd never be able to sustain the system with any sense of efficiency.

      I hope that this 'nudged' you into getting a clue about writing good code. Cheers.

      --
      I have no regrets, this is the only path.
      My whole life has been "UNLIMITED BLADE WORKS"
    5. Re:I hope someone will give a real reason later... by Anonymous Coward · · Score: 0

      Ladies and Gentlemen... I present the poor, under-skilled, sloppy wannabe coder who believes his job should be done by an IDE.

      Case sensitivity is there because that's the way the language works, the way the grammar is defined and because it works to make the code more legible. There are many, many other reasons (many of which have already been posted). I've seen enough mangled code as it is without introducing the nightmare that is case-insensitivity.

    6. Re:I hope someone will give a real reason later... by mopslik · · Score: 2

      1. That's a Unicode Problem. As I said, that may be interesting for the data handed to the compiler, but not for the IDE.

      If you're comfortable doing everything through your IDE, then fine. Me, I prefer to make quick and dirty hacks via a simple text editor. No fancy case-correction there.

      2. VARPTR is a Variable Pointer. Why shouldn't it be necessary to look something up in the documentary if you don't know your language well?

      I'm very thankful I'll never have to maintain any of your code that you might deploy in a corporate environment. Seriously, one of the reason why names should be intuitive is that you may not be the only one to look at the code. You may know that VAR = variable, but what about everyone else? 100 ambiguous variables later, and that someone's going to be pretty pissed that they have to keep referring back to your data dictionary.

      3. That is an unproofed assumption. Consider the comparison with LaTeX for example. Just because you use a system that automagically formats your text nicely (maybe because you can't), does this imply that you can't write a good text?

      The parent was suggesting that an incapability to handle case correctly is a reflection of a lack of knowledge of language structure, not language content. Your LaTeX example is wrong, in that you should have stated "does this imply that you can't write a text with proper grammar and structure". Very different things.

      4. All-Upper-Case is as consistent. What's your point? I have never confused any variables for functions and vice versa, but that may be because I don't insist on naming things like "ThisIsAThingy" and "ThatIsAThingy"?

      Agaim, your code = your knowledge. It's good if you're the only one who will ever look at the code, but not very useful outside of that. And the "thingy" reference is another good reason why variable names should be descriptive, not abbreviated or cryptic. Besides, all caps is harsher on the eyes. Still, suit yourself...

    7. Re:I hope someone will give a real reason later... by michaelggreer · · Score: 1

      What's wrong with VARPTR? Is VariablePointer really better?

      Yes. Obvously, it is clearer.

      A post up top stated what I think is the best reason, which is to distiguish between class and object (their example):

      Person person = new Person();

      This is pretty common code for me. Without case sensitivity I would have to get quite awkward. Java strives for legibility and organization. Other languages strive for other things. Don't fault it for trying to meet its goals.

    8. Re:I hope someone will give a real reason later... by heinousjay · · Score: 1

      I'm very thankful I'll never have to maintain any of your code that you might deploy in a corporate environment. Seriously, one of the reason why names should be intuitive is that you may not be the only one to look at the code. You may know that VAR = variable, but what about everyone else? 100 ambiguous variables later, and that someone's going to be pretty pissed that they have to keep referring back to your data dictionary.

      And to the OP: Please print this quote out, crumple up the piece of paper, and hammer it into your head.

      --
      Slashdot - where whining about luck is the new way to make the world you want.
    9. Re:I hope someone will give a real reason later... by misterpies · · Score: 1


      >> What's wrong with "VARPTR"? Are you on drugs? Is this Variable Pointer? Veterans Affairs Reporter? VARP Tree (whatever a VARP is)?

      That's what comments are for.

      --
      The author of this post asserts his moral rights.
    10. Re:I hope someone will give a real reason later... by Anonymous Coward · · Score: 0
      Case sensitivity forces consistency.

      Excellent argument. That's exactly why, I don't understand why so few people got it right. Regardless of the compiler's case (in)sensitivity you should NEVER want to name the same variable fooBar FooBar and FOOBAR in different portions of your code. The compiler merely enforces that. If you do, perhaps you should reconsider working in this field.

      I am sure the fact that many people are fascist about their naming conventions bothers that guy as well. Experience sometimes does not make up for formal education, when common sense forgets to kick in.

    11. Re:I hope someone will give a real reason later... by Zardoz44 · · Score: 1
      No. Comments are for explaining ambiguous logic. Variable/function/class names should comment themselves. What happens when you use the same variable in 20 different areas? Do I have to go find the comment, or has it been repeated 20 times as well?

      I hope I never have to read your code.

    12. Re:I hope someone will give a real reason later... by Bazouel · · Score: 1

      Dude, get a good IDE and stop whining ! Any IDE with intellisense will make you happy ...

      About the semicolon, what if I want my line of code to be on several lines to improve readability ? Think array initializations ... With CR/LF, that would not be possible. Also, the new line character varies from system to system.

      And frankly, VarPointer would be a fine compromise. VARPTR is ugly and I agree that VariablePointer is a bit verbiose.

      --
      Intelligence shared is intelligence squared.
    13. Re:I hope someone will give a real reason later... by IPFreely · · Score: 1
      Most arguments for case insensitivity are that it is easier or less error prone. If you can't handle getting the case of a name correct, you almost certainly don't have the ability to manage checking parameters and states, or generally doing any of the work involved in writing quality software.

      Now hold on there. You're trying to drive way too much assumption through that one. There is no way to tie programmer ability on any level to the issue of case beyond style. Get over it.

      A lot of the discussion seems to surround the issue if style and/or readibility. If the compiler is case insensitive, then even if the programmer misses the case, the compiler will pick it up anyway. Certainly the programmer should be consistant, but its not an error. The program won't fail. It's style. It's right up there with the differences over how to arrange your braces. Would you be offended if someone said your style of arranging braces meant you were less capable?

      And how about helping someone through something on the phone?
      "OK, Now look for foobar. Yes. Foobar. Capital Foo capitol Bar. Yes. No. capital eff, lower oh, lower oh, capitol bee, lower ah, lower arr. Right. No, no space. All together eff oh oh bee ah ar. Right. No. Capitol eff lower oh lower oh, no space, capitol bee.... Aww F**K it!"

      I've been programming for 20 years, 15 professionally. I've used plenty of case insensitive languages. It's no killer. I mostly did everything in one case and just went on. I didn't see a need to add my own complexity over what the compiler already enforces. The idea of using some mixed case naming scheme didn't even occur to me or others around me. The compiler didn't care, why should we? It wasn't until I started running into case sensitive languages that I even thought about it. And then, I just kept on using all lower case as if nothing had changed.

      If you are already used to case-sensitive languages, then a case-insensitve language may be hard to get used to. But the other way around is easy. It all depends on what side you are looking from.

      --
      There is nothing so silly as other peoples traditions, and nothing so sacred as our own.
  35. C does not assume an ASCII machine platform by Anonymous Coward · · Score: 0

    C is carefully designed so that it does not assume that the underlying platform on which it runs is natively using ASCII. A number of relatively obscure features, especially trigraphs, were put into the language specifically to make this work.

    While case-folding is fairly easy in ASCII because upper and lower case letters are exactly one bit apart, it would substantially complicate compilation on other platforms. It is relatively unnatural for the computer to allow case-insensitivity, even in ASCII, and in machines that natively use something other than ASCII it can be quite tedious.

    Having dealt with C implementations that are targeted for machines which are radically different from what most people are used to using, I have a lot of respect for the portability of C. For example, I once worked with a C implementation on an IBM mainframe processor that had no stack, so the C stack had to be synthesized using machine registers and memory conventions, but this worked!

    C was designed to be small AND portable. Java was designed to be, well, portable. No matter how careful you try to be, dropping case-sensitivity from the language would lead to nightmares when trying to achieve portability.

  36. Re: Who Needs Case-Sensitivity in Java? by Scarblac · · Score: 1

    But you do remember that Java source code is assumed to be Unicode, do you?

    That would be the killer argument, if you could use all those Unicode characters in identifiers. But you can't, identifiers can only use characters from the ASCII subset. Since this discussion is about identifiers, this point is moot.

    Source: http://java.sun.com/docs/books/jls/second_edition/ html/lexical.doc.html.

    --
    I believe posters are recognized by their sig. So I made one.
  37. C does not assume ASCII machine platforms by FriendlySolipsist · · Score: 5, Insightful

    C is carefully designed so that it does not assume that the underlying platform on which it runs is natively using ASCII. A number of relatively obscure features, especially trigraphs, were put into the language specifically to make this work.

    While case-folding is fairly easy in ASCII because upper and lower case letters are exactly one bit distant, it would substantially complicate compilation on other platforms. It is relatively unnatural for the computer to allow case-insensitivity, even in ASCII, and in machines that natively use something other than ASCII it can be quite tedious.

    Having dealt with C implementations that are targeted for machines which are radically different from what most people are used to using, I have a lot of respect for the portability of C. For example, I once worked with a C implementation on an IBM mainframe processor that had no stack, so the C stack had to be synthesized using machine registers and memory conventions, but this worked!

    C was designed to be small AND portable. Java was designed to be, well, portable. No matter how careful you try to be, dropping case-sensitivity from the language would lead to nightmares when trying to achieve portability.

    1. Re:C does not assume ASCII machine platforms by Nicopa · · Score: 1

      For example, I once worked with a C implementation on an IBM mainframe processor that had no stack, so the C stack had to be synthesized using machine registers and memory conventions, but this worked!

      Isn't the stack always synthesized using registers and memory conventions (plus perhaps some shortand instructions). =)

    2. Re:C does not assume ASCII machine platforms by FriendlySolipsist · · Score: 1

      What I meant is that C-friendly processors have machine (assembly language) instructions that reference the stack. How the stack is implemented by the processor at the microcode level is not quite what I was talking about, although it is an interesting point.

      One of the design philosophies driving C, but not Java, was to keep the language close to the machine implementaiton, which is why C has lots of non-orthogonal but really efficient features such as "increment" and "decrement" operators. Most machines do have stacks accessible with machine instructions.

      Taken to its logical conclusion, your point eventually reduces to the observation that it is all just ones and zeroes!

    3. Re:C does not assume ASCII machine platforms by T-Ranger · · Score: 1
      The other character set of historical interest, EBCDIC, has a simmilar "feature" of upper and lower cases having 1 bit of difference.

      So on 'old' computers, case smashing is trivial to do. For the record, both ASCII and EBCDIC's begain before computers.

      I have no idea if any of the modern charcter sets, Unicode for instance, can be case smashed as easily. On the other hand, computers of today are only about a billion times faster then the card punches and teletypes of the stone ages.

    4. Re:C does not assume ASCII machine platforms by MobiusKlein · · Score: 1

      Yes it is, but some processors do it with stack specific instructions - x86 with push/ pop instructions.

      Some other ones are mixed - 68k family, which push/ pop are actually a generic move to an address register (sp == a7) with auto increment / decrement. But function call / function return will always use the stack to store

      Others (like the original poster's CPU) apparently do not handle even function calls (must remember the previous address to go back to it - and put it somewhere.)

      If you are running a language that disallows recursion, you don't exactly need a stack at all.

      rbb

  38. Diversity by PeekabooCaribou · · Score: 1
    How else could I name all my variables variants of "stuff?"

    int stuff;
    int Stuff;
    int StUfF;

    (Man, it must be early for me to think that's funny.)

    --
    "I'll say it again for the logic-impaired." -- Larry Wall.
  39. Case sensitivity vs case preserving by ceri · · Score: 1

    Most, if not all, of the arguments that I've seen so far against case insensitivity have relied on a lack of case preservation as well. The two aren't tied together.

    Would the arguments against case sensitivity still apply if case was preserved? This would allow you to still name 'constants' in ALL_CAPS, have classnames start with a capital letter, and variable, package and method names start with a lowercase letter and have interCaps.

    1. Re:Case sensitivity vs case preserving by spitzak · · Score: 1

      I don't know what you are reading, but I saw dozens of posts of what I consider the most persuasive argument:

      class Rectangle rectangle;

      If this is not allowed, you either have to put ugly hungarian-type notation on either the class names or the instance names (like RectangleClass or rectangleI or both), or you have to make a harder-to-read language where the parsing rules allow the compiler to unambiguously know if a type or id is expected everywhere.

      Conversely *everybody* arguing against case-sensitivity seems to say "it is easier to type, and my Visual Basic fixes the case for me". Dude, if your IDE "fixes the case" then you don't need case insensitivity!!!. Think hard and don't hurt your brain: if the case is "fixed" then it is already correct for a case-sensitive compiler! The fact that VB programmers don't seem to grasp the obvious is proof that that thing must rot their brain...

  40. Because... by StarBar · · Score: 1

    it will make you think twice before entering your code. It is odd having case insensetiveness rather than the opposite. Otherwise we could also be insensetive to 0 (zero) and O (upper case o) as well as l (lower case L) and 1 (one) etc.

    IDE:s that correct your errors will become your addiction and soon you and up not beeing able to perform without them. Some people even think that compilers should cover your ass entering poor code by optimizing away redudant tests and dead code and turn your loops upside down. You'll be surprised when you try to port the code to a compiler lacking these 'features'.

    Also learning to use correct naming conventions, indentions and language specific programming style will make everyone else so much more happy!

  41. the reason is simple by Anonymous Coward · · Score: 0

    hardcore programmers often like to do things in the difficult way in order to separate themselves from plebe-programmers.

    One way they do this is by using case sensitive languages. By showing others how proficient they are at telling apart a dozen variables based on different casing of the word 'inumfxsk', they both earn praise from other hardcore programmers and confuse the aformentioned plebes.

    there is another advantage of using case sensitive programming languages. With the rise of RADs and faster CPUs, plebes are churning out programs and updating them in the same time that it takes a hardcore programmer to display their main window using assembly code. When asked by their boss is why they take 10 times as long to do anything in their language, they can point out the advantages of using their case sensitive programming language and being able to create a dozen variables based on different casing of the word 'inumfxsk'. This is definitely preferable to being forced to spend the five hours it takes to learn one of those decidedly uncool RAD languages. I mean, what if your other hardcore programmer friends find out?

    1. Re:the reason is simple by Anonymous Coward · · Score: 0

      boy someone is bitter

  42. eNGliSh by Ratbert42 · · Score: 1

    i AgrEE. hElL, whY DoES eNGlIsH hAvE tO Be cASe sEnsItiVe? dOeS iT ReAlLy mAttEr?

    1. Re:eNGliSh by forsetti · · Score: 1

      trUE -- bUt I sTiLL UnDERStand YoUR mESsaGe. tHe MeanINg haSN'T cHanGed.

      --
      10b||~10b -- aah, what a question!
  43. Silly Troll... by jonadab · · Score: 2, Informative

    > Without making this into a religious war, can someone make the argument
    > of why case-sensitivity in a language is 'a good thing'?

    If you look up "holy war" online and skip over anything having to do with
    real-world non-computer-geek religions, you'll find the following classic
    examples of holy war materiel: Emacs vs vi, big-endian vs little-endian,
    *nix vs non-*nix, CISC vs RISC, and case-sensitive vs case-insensitive.

    In short, it's highly a matter of taste. Some people even like to have
    case-sensitivity in their filesystems. (Personally, I dislike that and
    think that should be optionally possible to turn it off in certain
    directory trees (particularly, /home).)

    Personally, I don't mind case-sensitivity in a language, generally. Perl
    is very much case-sensitive, as is elisp, and neither has ever troubled me.
    The only time case-sensitivity in a language has really bothered me is in
    Inform -- but that was because of the incompatible _changes_ in the case
    sensitivity from Inform5 to Inform6, which caused a lot of my code to break.
    Now, that said, it is also possible for a language which is case-sensitive
    to go far wrong in its use of case by being inconsistent in a way that will
    leave you unsure which case is correct sometimes. For example, if a lot of
    the ready-made modules/libraries/whatever that you use are not consistent
    with one another in their use of case, that would be very bad. In elisp and
    Perl, I have not generally found that to be the case. I can't speak for
    Java; my attempts to learn Java have largely ended with "Ew, it's like C++".

    --
    Cut that out, or I will ship you to Norilsk in a box.
    1. Re:Silly Troll... by Trimbo2 · · Score: 1

      If you look up "holy war" online and skip over anything having to do with real-world non-computer-geek religions, you'll find the following classic examples of holy war materiel: Emacs vs vi, big-endian vs little-endian, *nix vs non-*nix, CISC vs RISC, and case-sensitive vs case-insensitive.

      You forgot:

      whatever
      {
      }

      VS

      whatever {
      whatever;
      }

    2. Re:Silly Troll... by jonadab · · Score: 1

      > You forgot

      No, I didn't forget per se. I chose not to mention that one because I was
      unsure of what terminology to use to concisely mention it without going into
      the details of the two positions. IOW, I didn't know what simple word to
      put on each side of the "vs", so I just skipped it. But yes, that's the
      other classic one. Of late, Perl vs Foo is becomming somewhat popular as
      well, but Foo varies so widely (everything from C to PHP) that I left that
      one out also.

      There is one that I did forget, and should have included: OOP vs any
      other programming paradigm (procedural/imperative and functional are the
      most popular other choices). Though being a Perl geek I of course skirt
      around that one by advocating a multiparadigmatic approach. ("Yeah, see,
      this bit of code here greps the list of objects returned by somefunc for
      ones that return a true result for somemethod and does a map transform on
      the resulting list, producing a list of hasrefs of closures that it assigns
      to this lexically-scoped array. Each hashref of closures holds one of the
      objects in common between several subs, which will use the object to
      maintain state through subsequent calls, until the whole thing passes
      out of scope at the end of the block." There you've got OO, functional,
      and procedural programming all rolled together in one big happy family :-)

      --
      Cut that out, or I will ship you to Norilsk in a box.
    3. Re:Silly Troll... by Trimbo2 · · Score: 1

      I couldn't think of a name for these either, so I just gave an example. I'm sure somebody out there must know what they are called? If not, lets invent a name for then now and be done with it :D

    4. Re:Silly Troll... by jonadab · · Score: 1

      > I'm sure somebody out there must know what they are called?

      Ask a C programmer. It's mostly C (and maybe C++) programmers who spend time
      thinking about indentation styles. People who use lisp-based languages just
      let their editors' parenthesis-matching and automatic-indentation stuff sort
      it out, and Perl programmers worry more about semantics than syntax, or just
      put the whole block on one line if it's small. Python enforces its own brand
      of indentation at the language level, so its programmers can't really get
      into arguements about which option is visually better; they do what works.
      Most other languages are only really used by a relatively small group of
      people, so they don't get into the debates as heavily. That leaves Java,
      but I don't really know how Java programmers view indentation, since I haven't
      had much contact with Java people.

      There *are* names for the different indentation styles, mostly taken from
      the most famous person or group or book that advocates them, such as Gnu,
      K&R, or whoever. But not being a C programmer I don't know which are which.
      Truth be told, I have a hard time remembering which is which between big
      endian and little endian as well; most of the data I work with is structured
      as a flat list or string of single-byte characters, and the languages I use
      are sufficiently "into" portability that they don't expose such details as
      in-memory byte-storage order to the programmer directly. The only time I've
      ever really had to do with it is when working with the occasional binary file
      format, but mostly I prefer to let someone else write a module for the format
      and then I just grab the module off of CPAN and use it :-)

      --
      Cut that out, or I will ship you to Norilsk in a box.
  44. Making the case for case sensitivity by Tune · · Score: 1

    I agree that clearer names are always an advantage -- in general. What "clearer" means remains a question. First, mapping two completely unrelated identifiers to the same function doesn't always generate a compiler warning. Just think of overloading, which you would have to consider similarly dangerous.

    Second, it may not occur to you that SetSlower & SetsLower are similar because they have completely unrelated meanings. With case-insensitivity you always need to be aware that you identifier might mean something different given a different morphological decomposition of that identifier.

    Meaningfull identifier should be able to express as much meaning as possible. Thus, the form of an identifier should not be a goal in itself, but rather an expression of meaning. And ambiguity simply does not help.

    --
    Is a computer language with goto's totally Wirth-less?

  45. All of the arguments in one post by zero_offset · · Score: 4, Interesting
    Having fought this war several times before (I agree that case sensitivity is an unnecessary pain in the ass), and I believe I can sum up most of the likely responses in one big post.

    1. History -- Argument: Lots of languages are case sensitive, and people seem to be capable of dealing with it, so this is a non-issue. Response: The problem is, of course, that this response completely avoids making a point relevant to the argument.

    2a. Readability -- Argument: Forcing people to type "if" instead of "IF", "If" or god forbid, "iF" will enhance readability. Response: I personally feel that all-lowercase individual words are a lot easier to read than leading capitals or all-uppercase, but this is only a solution for the predefined keywords of a language, and really fails to address the question of case *sensitivity* to case in programmer-defined names.

    2b. Readability -- Argument: If I define myCleverMethod, I don't want to debug code littered with MYcleVERMetHOD. Response: Somebody inevitably posts some variation on this, and I can't imagine why they bother. What kind of idiot would bother with such screwy capitalization?

    3. Flexibility -- Argument: Case sensitivity allows you to use the same multi-word phrase for two unrelated things when they both happen to require the same spelling. Response: I actually had somebody use the examples CarPass and CarpAss to illustrate the flexibility of case sensitivity (on the pre-release C# mailing list at Don Box's develop.com). To date I have not seen an example of this which is even remotely defensible. Elsewhere in this /. discussion someone posted SetsLow and SetSlow, which sounds slightly more realistic, but it's still reaching. Somebody show me one where the "obvious" names are significantly better than simply choosing an alternative.

    4a. Parsing -- Argument: The main reason case sensitivity exists is because uppercase and lowercase letters really are different things to a computer. Response: This mattered a lot in the old days of computing (which also yielded the terseness we see in languages like C). The machine on my desktop has a 3GHz CPU and 1GB of RAM. It can compile tens of thousands of lines of code in a matter of seconds. Although it can probably be argued that non-ASCII platforms would have a harder time performing this conversion, I'd also point out that databases and other applications in those same environments perform case conversions quite easily on those same platforms. I do not consider this a valid argument.

    4b. Parsing -- Response: The standard parsing argument could be extended in equally ridiculous directions. With the considerable power of modern desktop computers, we can do all sorts of things with text. Why not treat red, blue, and boldface text as separate characters, too?

    5. Mathematics -- Argument: Mathematicians regularly represent different variables and other elements which are differentiated only by notational case. Response: Due to the incredibly tiny fraction of programmers who are also mathematicians writing mathematical code, I believe this argument is irrelevant. It's probably one of the more interesting arguments, but frankly it's always annoyed me in mathematics, too. :)

    6. Constants and Classes -- Argument: Traditionally, many languages define constants using names which are all-uppercase, and more recently classes are often defined using names which are captialized. Response: This one always annoys me. Usually the same person is saying that the capitalization differences assist in the readability of the code moments after they've made the argument that capitalization should be inflexible for the sake of readability! There is nothing about case-insensitivity which would prevent this practice. I do it myself when I use case-insensitive languages. What it would prevent is using the same WORD to mean two different things. If that isn't just begging to introduce readability errors, I can't imagine what is. Nothing about case-insensitivity prevents peopl

    --

    Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    1. Re:All of the arguments in one post by egomaniac · · Score: 1

      1. History -- Argument: Lots of languages are case sensitive, and people seem to be capable of dealing with it, so this is a non-issue. Response: The problem is, of course, that this response completely avoids making a point relevant to the argument.

      Rebuttal: If people are really good at dealing with it, then that makes a pretty strong point that this is a non-issue. Why should we waste a lot of time and effort fixing a non-issue?

      2a. Readability -- Argument: Forcing people to type "if" instead of "IF", "If" or god forbid, "iF" will enhance readability. Response: I personally feel that all-lowercase individual words are a lot easier to read than leading capitals or all-uppercase, but this is only a solution for the predefined keywords of a language, and really fails to address the question of case *sensitivity* to case in programmer-defined names.

      Rebuttal: You admit that you feel all-lowercase keywords are easier to read. So do I. So does almost everybody else. Let's enforce 'em.

      What benefit is there to some people deciding to write "IF A=B THEN..." and other people deciding to write "if a=b then..." other than making everything difficult to read?

      2b. Readability -- Argument: If I define myCleverMethod, I don't want to debug code littered with MYcleVERMetHOD. Response: Somebody inevitably posts some variation on this, and I can't imagine why they bother. What kind of idiot would bother with such screwy capitalization?

      Rebuttal: It's not just MYcleVERMetHOD we're worried about. We're also worried about myclevermethod and MYCLEVERMETHOD which, at first glance, do not even look remotely related to one another but are in fact the same thing in a case-insensitive language. And people will very much decide to type it in all-lowercase or all-uppercase, because if they intended to type it in the "correct" case, they wouldn't be arguing for case-insensitivity.

      3. Flexibility -- Argument: Case sensitivity allows you to use the same multi-word phrase for two unrelated things when they both happen to require the same spelling. Response: I actually had somebody use the examples CarPass and CarpAss to illustrate the flexibility of case sensitivity (on the pre-release C# mailing list at Don Box's develop.com). To date I have not seen an example of this which is even remotely defensible. Elsewhere in this /. discussion someone posted SetsLow and SetSlow, which sounds slightly more realistic, but it's still reaching. Somebody show me one where the "obvious" names are significantly better than simply choosing an alternative.

      Rebuttal: Fine.

      User user = new User();

      is better than

      User theUser = new User();

      4a. Parsing -- Argument: The main reason case sensitivity exists is because uppercase and lowercase letters really are different things to a computer. Response: This mattered a lot in the old days of computing (which also yielded the terseness we see in languages like C). The machine on my desktop has a 3GHz CPU and 1GB of RAM. It can compile tens of thousands of lines of code in a matter of seconds. Although it can probably be argued that non-ASCII platforms would have a harder time performing this conversion, I'd also point out that databases and other applications in those same environments perform case conversions quite easily on those same platforms. I do not consider this a valid argument.

      4b. Parsing -- Response: The standard parsing argument could be extended in equally ridiculous directions. With the considerable power of modern desktop computers, we can do all sorts of things with text. Why not treat red, blue, and boldface text as separate characters, too?


      Rebuttal: It takes long enough to compile, say, Linux, that I'm not out looking for ways to slow it down further.

      As for the red and blue argument, last I checked we were working with plain text files. If we were working with styled text files,

      --
      ZFS: because love is never having to say fsck
    2. Re:All of the arguments in one post by jc42 · · Score: 1

      If I define myCleverMethod, I don't want to debug code littered with MYcleVERMetHOD.

      Heh. There is the story about the Expert's Exchange web site, which was originally "ExpertsExchange.com". Then some pranksters started referring to them as "ExpertSexChange.com". But the real killer was when anto-porn filters started blocking them for the same reason. So now they're "experts-exchange.com".

      Of course, host.dom.ain names are officially case insensitive, which is probably a Good Thing. Funny thing, though, is that user ids are case sensitive on some systems and not on others, and no matter what the standards say, joe@foo.bar.com and Joe@foo.bar.com may or may not be the same user.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    3. Re:All of the arguments in one post by 91degrees · · Score: 1

      And since I know you're going to make the argument "but you can distinguish it from context!" -- Quick, is MyThing.init() calling a static method on the MyThing class, or are we calling an instance method on an instance?

      If you have static and instance methods of the same name, then I think you deserve everything you get, but aside from that - In C++ you can give an instance the same name as a class. Future references to that symbol within that symbol's scope refer to the instance.

      To make things clearer, you could always find a simple prefix for an instance. The reason there isn't a standard is probably simply that there's no need for one.

    4. Re:All of the arguments in one post by Anonymous Coward · · Score: 0

      >Why not treat red, blue, and boldface text as separate characters, too?

      You mean like in ColorForth?

    5. Re:All of the arguments in one post by zero_offset · · Score: 1
      I really hate point-by-point arguments, but I guess I brought it upon myself. :) So, here we go...

      1. History -- Argument: Lots of languages are case sensitive, and people seem to be capable of dealing with it, so this is a non-issue. Response: The problem is, of course, that this response completely avoids making a point relevant to the argument. Rebuttal: If people are really good at dealing with it, then that makes a pretty strong point that this is a non-issue. Why should we waste a lot of time and effort fixing a non-issue?

      First of all, it wouldn't require a lot of time and effort to "fix" this. The question isn't whether anyone can deal with case-sensitivity, it's the fact that a lot of people simply don't like it.

      2a. Readability -- Argument: Forcing people to type "if" instead of "IF", "If" or god forbid, "iF" will enhance readability. Response: I personally feel that all-lowercase individual words are a lot easier to read than leading capitals or all-uppercase, but this is only a solution for the predefined keywords of a language, and really fails to address the question of case *sensitivity* to case in programmer-defined names. Rebuttal: You admit that you feel all-lowercase keywords are easier to read. So do I. So does almost everybody else. Let's enforce 'em. What benefit is there to some people deciding to write "IF A=B THEN..." and other people deciding to write "if a=b then..." other than making everything difficult to read?

      I have friends who prefer all caps. They find all lowercase difficult to read. Their preference is equally valid. I don't feel the need to impose my preference on anyone else, I prefer to let the user make a choice.

      2b. Readability -- Argument: If I define myCleverMethod, I don't want to debug code littered with MYcleVERMetHOD. Response: Somebody inevitably posts some variation on this, and I can't imagine why they bother. What kind of idiot would bother with such screwy capitalization? Rebuttal: It's not just MYcleVERMetHOD we're worried about. We're also worried about myclevermethod and MYCLEVERMETHOD which, at first glance, do not even look remotely related to one another but are in fact the same thing in a case-insensitive language. And people will very much decide to type it in all-lowercase or all-uppercase, because if they intended to type it in the "correct" case, they wouldn't be arguing for case-insensitivity.

      I understand the argument you're making. First of all, the reason I listed the poorly-mixed-case argument is because people DO make that specific argument, without any intention of referring to the more reasonable case you present. Speaking more specifically to your example, in just about every other area of programming, it is recognized as extremely bad form to use a single element for multiple things. I see this most commonly in databases (e.g. flag columns where the range of values span several unrelated sets of meaning). Differentiating an entire word or phrase only by case is just another example of this.

      3. Flexibility -- Argument: Case sensitivity allows you to use the same multi-word phrase for two unrelated things when they both happen to require the same spelling. Response: I actually had somebody use the examples CarPass and CarpAss to illustrate the flexibility of case sensitivity (on the pre-release C# mailing list at Don Box's develop.com). To date I have not seen an example of this which is even remotely defensible. Elsewhere in this /. discussion someone posted SetsLow and SetSlow, which sounds slightly more realistic, but it's still reaching. Somebody show me one where the "obvious" names are significantly better than simply choosing an alternative. Rebuttal: Fine. User user = new User(); is better than User theUser = new User();

      My response for the preceding item applies here, as well. Simply put, it isn't good practice to duplicate the class name in the instance variable. The entire concept behind defining a Class is that i

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    6. Re:All of the arguments in one post by a1291762 · · Score: 1
      I'd also point out that databases and other applications in those same environments perform case conversions quite easily on those same platforms.


      I'd like to point out to you that "databases and other applications" are USER programs. USERs generally expect case insensitivity. However, it's not USERs that do the coding.

    7. Re:All of the arguments in one post by zero_offset · · Score: 1

      You're missing the point. I was talking about the processing overhead related to dealing with case insensitivity.

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    8. Re:All of the arguments in one post by vrt3 · · Score: 1
      I have friends who prefer all caps. They find all lowercase difficult to read. Their preference is equally valid. I don't feel the need to impose my preference on anyone else, I prefer to let the user make a choice.

      Aaaaaaaaaarrrrrrggghhh
      So according to you it's perfectly fine if you use ParseCmdLine in a program, another programmer uses parsecmdline, yet another uses PARSECMDLINE and a fourth one writes parsecmdlinE, all in the same program? Now it's difficult to read for everybody. Just great. As long as you're the only author you can do whatever you want, but for any project that's larger than that there needs to be some kind of agreement. A case sensitive compiler is not enough of course, but IMO it surely helps.

      It's like driving on the left side or the right side of the road. Some prefer left, some prefer right; but more important than any person's preference is that we all agree to drive on the same side of the road.

      --
      This sig under construction. Please check back later.
    9. Re:All of the arguments in one post by zero_offset · · Score: 1
      Now you're doing it. "parsecmdlinE"? Don't be silly.

      As for the other questions, yeah, it's fine by me. Because I'll go see what "parsecmdline" actually IS, rather than guessing based on how they typed it.

      I am not in opposition to standards. I am opposed to the base language forcing case-based standards.

      It isn't at all like driving. The rule you cite is a safety issue and is completely irrelevant. It's more like putting the steering wheel on the left or right side of the car. If production cost wasn't an issue, it would probably be an option.

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    10. Re:All of the arguments in one post by crazyphilman · · Score: 1

      Here is my rebuttal:

      The rationale for case-sensitivity that you forgot to mention is "democracy".

      A larger number of programmers want Java to be case-sensitive than case-insensitive, and so Java, ruled by the JCP, is case-sensitive. Is it a personal preference? Perhaps it is. But it is the personal preference of the majority, and so it is carried into the language.

      There's nothing wrong with this. It is the way of the world. ;)

      --
      Farewell! It's been a fine buncha years!
    11. Re:All of the arguments in one post by tepples · · Score: 1

      However, it's not USERs that do the coding.

      People who "do the coding" are USERs of the coding environment. USERs of WWW authoring packages often "do the coding" in the ECMAScript language.

    12. Re:All of the arguments in one post by vrt3 · · Score: 1
      Now you're doing it. "parsecmdlinE"? Don't be silly.

      That was, admittely, a contrived example. But really, there are silly people out there. One of them might be one of your co-workers.

      As for the other questions, yeah, it's fine by me. Because I'll go see what "parsecmdline" actually IS, rather than guessing based on how they typed it.

      In my experience, code tends to be a lot less readable if the same identifier is written in different ways. Sure you can go look and see what it really is, but it's a lot easier if you can see it just by glancing over it. And as other posters have mentioned, it's more important for code to be easy to read than easy to write.

      --
      This sig under construction. Please check back later.
    13. Re:All of the arguments in one post by iabervon · · Score: 1

      There's another good reason: insensitivity to case is not well defined. There are character sets where a single capital character corresponds to a sequence of lowercase characters (e.g, some german encodings have a single character for the double S, but use two 's' characters for the lowercase). There are others where two different lowercase letters have the same uppercase (due to dropping accent marks or such). So the "is the same ignoring case" relation is not actually transitive, so you can't use equivalence classes for identifiers. Case is not nearly as simple in general as it is in ASCII.

  46. Re:An argument for case-sensitivity by cowens · · Score: 1

    And it is not just mathematics. you also have things like:

    FILE* file;

    It also cuts down on the collisions between constants and variables:

    #DEFINE ANSWER 42

    int answer = ANSWER;

    And although I can't think of any examples right now it also cuts down on the collisions with keywords.

  47. Object naming conventions by scott_davey · · Score: 1

    A major reason for case sensitivity is when naming classes and instances of classes.

    A common convention in Java and PHP is to name classes beginning with a capital letter, but name instances of classes beginning with a lowercase letter.

    For instance: FooBar is a class, but fooBar is an instance of a class. In general, conventions make code easier to read, and case sensitivity is required for this convention.

    Another convention I like is stubblyCaps, although you don't strictly need case sensitivity for that one.

    Of course, some conventions are just plain dumb - like that hungarian notation of Microsoft, where they prefix their variables by its type. I thought that was good for a while, but then I had to change a variable's type one day...damn.

    Anyway, for my money, I like the precision of case sensitivity. And a good IDE makes it painless.

  48. Absurdly tiny speed hack by Reverend528 · · Score: 1

    Compilers can be slightly faster if they don't have to take the time to match names with case inconsistencies.

  49. Two Simple Reasons... by Clanner · · Score: 1

    The simplest two reasons I can think of for case sensitivity in a language is to maintain use of all available namespace (case insensitive cuts the namespace roughly in half), and it allows for more efficient compilers. IE, compilers don't have to treat two different characters the same, like "A" and "a", which have different intrinsic values.

    The namespace issue would be the most important to me, though. Besides, What's the problem with typing case sensitively? You do so in "normal" communications all the time- what's so bad about continuing that habit in your coding? It makes the code easier to read, and if you stick to conventions, it makes understanding your code that much faster as a reader can differentiate an item based on it's capitalization. Personally, I hate reading code that's all caps...

    --
    The dry fish swims alone.
  50. Uhh... readability? by duffbeer703 · · Score: 1

    hAVe YOu eveR tRiED TO reAd a MIxeD cAsE DoCUMenT?

    iT IS ReAL pAIN iN THe aSS.

    cODE is dIFfiCUlT eNOugH tO rEAd wIThouT coMPLIcatINg tHiNGs fURthEr.

    --
    Conformity is the jailer of freedom and enemy of growth. -JFK
    1. Re:Uhh... readability? by Nucleon500 · · Score: 1
      cODE is dIFfiCUlT eNOugH tO rEAd wIThouT coMPLIcatINg tHiNGs fURthEr.

      I assume you're arguing for case-insensitivity. But you're reading a mixed-case paragraph right now. i'd rather read that than this.

      Mixed case allows you to add context clues about an identifier, like Hungarian notation, only more subtle. Frankly, I much prefer DEFINE, Class, and instance over d_Define (or D_DEFINE, or d_define, depending on the author and IDE), CClass (or cClass, or c_Class), and i_instance (...).

  51. One key example by Tom7 · · Score: 1

    When implementing a language in itself (or one like it), you usually want to have classes, or datatypes, or arms in a union, named after features of that language. For instance, in Java you might have a class called 'If' that represents an if expression. Of course, you can't call it 'if' because that's a keyword. 'If', in my opinion, is a lot better than 'if_e' or whatever.

    Some languages use initial capitals to distinguish lexical classes (like O'caml), and this is another reason to have case sensitivity.

    I think that what you really hate is Java's difficult capitalization rules. I also find biCapitalization difficult because the rules are not as simple as they claim to be. Is it subString or substring? searchAST or searchAst?

  52. (d) counters (d) by Tom7 · · Score: 1

    I'm afraid you're guilty of using a (d)-style argument in your own rebuttal. Basically, you are saying that you like case insensitivity better, and that's it.

    I don't like Java's mile-long member names either, but I don't think that has anything to do with case (in)sensitivity.

    1. Re:(d) counters (d) by Hakubi_Washu · · Score: 1

      Hm, to me it was more of a: I don't like it because of... But you may be right, it _is_ just my opinion (which I tried stating from the beginning) Apologies to anyone who felt offended.

  53. More one-letter Variables! by Ba3r · · Score: 5, Funny

    With Case Sensitivity, I can have 52 one letter variables, not 26!

    1. Re:More one-letter Variables! by Anonymous Coward · · Score: 0

      Don't forget the venerable but oft overlooked workhorse of the one letter variables in C: _.

  54. The answer is in the question... by ykoehler · · Score: 3, Interesting


    Why is Visual BASIC trying to preserve the case-sensitivity? If you think as you said that it is only to please the eye, think again.

    The BASIC language was to introduce people to programming and is a language that try to remove rules to allow faster results (faster != better all the time...).

    If they preserve case it probably is because people requested it and if people requested it probably has something to do more the need to have consistency.

    In english, why do we put name with a Capital in front? Or why to sentence required to be uppercase? Because case, like a letter create different pattern which may be easily recognized by the brain and treated in a different way.

  55. get used to it I guess..... by preclose · · Score: 1

    I suppose there probably aren't any huge advantages to having variables be case sensitive. It does lead to mistakes. However, I would assume it does make compilation slightly faster as it wouldn't have to figure out that "var1" and "vAr2 are the same variable. I really doubt very few would ever do something like have variable aa and AA because that would just be bad programming. However, there are coding conventions (they vary from place to place) that generally take care of the problem of case sensitivity. Globals in all CAPS, variables of the form wordWordWord like tempMemPointer or whatnot. Following a convention will help because then you won't have to even think about whether or not a local variable is of the WORDWORD or wordWord.

  56. Case Insensitivity by Detritus · · Score: 1
    My reasons for disliking case-insensitive software:
    • Ugliness -- Instead of a nice set of unique symbols, the system has to deal with the language and location dependent concept of case, which is an ugly mess.
    • Inefficiency -- Every string comparison is slower.
    • Imprecision -- If I write "abTable", I mean "abTable", not "abtable", "Abtable" or "ABTABLE". If I wanted it in another form, I would have written it that way in the first place.
    • Inconsistency -- Each file name and variable name should have a unique and distinct value. Allowing multiple names for a single object just creates confusion, inconsistency and illegibility.
    --
    Mea navis aericumbens anguillis abundat
  57. why not have it both ways? by fist_187 · · Score: 1

    there are plenty of reasons for and against case sensitivity in languages... so why not allow both?

    just make up a compiler directive or something that indicates whether to de-case-ify your code.

    --
    Somewhere on this page I have hidden my signature.
  58. Funny you should mention that ... by Vintermann · · Score: 1

    ... since lisp and it's relatives are often used in computer algebra systems, and lisp is case insensitive.

    On the other hand, lisps allows all kinds of characters in identifiers, e.g eq? load-this-now are.we.there!yet? so we can still have fun.

    --
    xkcd is not in the sudoers file. This incident will be reported.
  59. Fix it yourself by nukem1999 · · Score: 1

    Write a 5 line script that will make a copy of your code in all lowercase and compile that instead. Or just type in all lowercase to begin with (ewwwww). Or get an editor that'll fix case for you (I saw at least 2 mentioned in this thread). Or just do a search-and-replace in your file to turn whatever variable errors into the case you want.

    Me? I want a compiler that will make me toast on the first build of the day.

  60. Except by hding · · Score: 1

    that Lisp is case sensitive. It's just that by default the reader upcases the characters in symbols when it reads them. One can either alter the readtable or quote symbols or characters in symbols as desired to avoid that.

  61. Re: Who Needs Case-Sensitivity in Java? by Vintermann · · Score: 1

    "Well, if you prefer hacking non-case-sensitive code, just don't leave your Visual Basic and Windows playground and let adult programmers with a mathematical background work as they did since the computer was invented."

    Hey wannabe oldtimer, heard of
    Fortran? Lisp? Cobol? PL/1? Pascal? Prolog? Forth? Algol? Basic? Simula? Snobol? All are older than C, all are case insensitive. It was only those C punks who apparently were so impressed with their new mixed-case systems that they wanted it in their language.

    (True, you may not want to program in all of these, but what has that got to do with it?)

    --
    xkcd is not in the sudoers file. This incident will be reported.
  62. Re:a cultural thing? -- like in German by tengwar · · Score: 1

    "When the literate German dives into a sentence, that is the last you will see of him until he emerges from the other side of the Atlantic with the verb in his teeth" - Oscar Wilde, I think.

  63. Learn another (natural) language and you'll know by lokedhs · · Score: 3, Insightful
    In english, the concept of upper and lower case is quite simple. Every uppercase letter has a lower case version, and this rule is true the other way around.

    Speakers of other languages are not quite as fortunate. I'll try to explain, but the horrible lack of Unicode slashdot coupled with the extremely stupid character filter will make this slightly more difficult than it should be.

    German, for example, has a letter which is basically a "double s". This letter only has a lower case form, in upper case, this letter becomes "SS". However, "SS" in lower case becomes "ss", not "double s".

    French has a character which is a lower case "e" with two dots above. The upper case form of this letter is the normal "E" in france, but in french canada this letter becomes an upper case "E" with two dots.

    There are other languages which has characters that only exist in upper case or lower case forms.

    Do you realise just how complex the casing rules becomes when you have to take these things into consideration? Keep in mind that Java supports all unicode characters in symbols.

    The exact same argument can be used when explaining why the oeprating system kernel shouuld not have case-insignificant file names. This is a localisation issue and neither your java compiler nor the operating system kernel should have to worry about what locale you have in order to determine how a certain string of characters should be interpreted. (yes, encoding issues always creeps in, but that's on a different level).

    Just think about it. Your program compiles properly if you select "french france" when you log in, but fails when you use "french canada".

    Don't you think it's easier just to specify that symbols are case significant?

  64. I've always found it usefull by NemoX · · Score: 1

    If I have a class or structure that defines constants, such as a set width or length for a parent object. Then I utilize this class/struct in another class which is creating a child object, also with length and width, but this time a user defined value, I can use "width" for the user value, and "WIDTH" for the constant value, without having to rewrite as much code in the new class. It also helps me, as the programmer, to help better identify my own code. "VALUE"? Oh, that is a constant, or struct. "Value"? Oh, that must be my function, or class name. "value"? Oh, that is a program defined variable.

    I stated off with Ada '95 (ok, technically it was Logo, back in grade school in the early 80's, but I don't think that really counts ;) ) which is case insensitive. Then I moved onto Java, C++, VB, and now C#. When I first learned Java, I initially hated the fact that it was case sensitive. However, once I learned how it made my life easier as a programmer, and my code more readable, I quickly fell in love with case sensitive languages. Now, I hate VB just for that fact (oh yeah, and it's lack of semicolon end lines, and funky for loop structures, and...oh who am I kidding, I just hate VB :) ), and I no longer code in Ada (for less personal reasons, like, no one really uses it much anymore).

    The only place I find case insensitivity worth while is in a quick and dirty script. However, even most scripting languages are case sensitive (Perl, JScript). Which leaves only vbscript and WSH (I think...I program case sensitive out of habit, now) as case insensitive scripts (of the ones I've used, anyway). But, again, in most programmers opinions (programmers that I know, anyway), they will all prefer Perl or JScript over VBScript due to their ability to be a little more robust, and ability for shorter scripts to acomplish a lot of work.

    Obviously, if you are going to use ThIsAsAvArIaBlE name, you are just being stupid, and defeating the purpose. Making it less readable, less portable, more difficult to work with, and you less liked by your co-workers.

  65. Why is it ... by Vintermann · · Score: 1

    "Also it probably is a windows centric idea to expect things to be case insensitive"

    Why is it that as soon as someone suggests something opposed to current "hacker" taste he is instantly derided as a windows l0ser?

    ANY language I could find older than C is case insensitive. Didn't you hear the original poster talk about his __PL/I__ experience? And you deride him as a newbie? Get a grip!

    --
    xkcd is not in the sudoers file. This incident will be reported.
    1. Re:Why is it ... by 12dec0de · · Score: 1

      Excuse me, could you please point out the point where I deride windows users?

      I was stating an observation on capitalisation preferences. And continuing with a somewhat negative statement on the FORTRAN era.

      Why is it with some people, that they expect negative vibes everywhere? Is it just slashdot, or is it me? Or prejudice on you part?

    2. Re:Why is it ... by spitzak · · Score: 1

      Languages on systems that had no lower-case letters do not count (ie anything on punchcards). Languages implemented in ways that compressed labels to 6 or fewer bits per character do not count for the same reason.

      The only early language I can think of that worked on terminals that had multiple cases is Lisp. It absolutely was case-sensitive.

      Using different cases to mean different things has a history in mathmatics back to the early 19th century when modern algebraic notation was standardized. A matrix was often called "A" in the same calculation where a scaler was called "a".

  66. Relic by Godeke · · Score: 1

    Case sensitivity is a relic of the long gone day when calling upper() was considered an extravagance by the designers of C. Being a low level language, many of the functions of the original AT&T version of C were as stupid as possible while still achieving the goals. Null termination of strings, (actually the entire string function set), and bare pointer arithmetic are other examples. It was considered "super assembly for OS writing".

    Being such a bare bones, close to the metal language, case sensitivity made sense. However, since C was case sensitive, this sensitivity was used to partition CONSTANTS from variables and functions. Later in C++ we see Methods (initial cap) vs variableName (initial lower) became standard.

    Many later languages modeled at least partially upon C, so it isn't surprising that they retained that sensitivity. However, at this point is is absurd: if we really want to differentiate object types, color, size and font and other options are available in a modern editor. However, if we really-really want case sensitive Methods, variables and CONSTANTS, why not have the editor enforce these rules? I do find the case rules make for more readable code, but I can in many languages write incorrect case and it will run, which defeats the purpose (it simply gives the obfuscated code writers one more weapon against us...)

    --
    Sig under construction since 1998.
    1. Re:Relic by Anil · · Score: 1

      Your idea simply removes the compiler, and the language syntax for that matter, from the equation.

      If you designed (and were somehow able to get people to use) an editor that was language aware and autocorrected for you, that doesn't mean that the underlying language would have to be case-insensitive.

      But, would people programming without your editor be able to use the language at all? Would they be able to get more 'power' out of the language by using another editor?

      Considering the number of people here who would prefer a caseless C/C++/Java perhaps you could make some money off of writing an editor that crippled the language and selling it. Maybe a grammer/spelling-correcting type module for MS-Word.

      hmm. maybe I should patent this concept.

    2. Re:Relic by Godeke · · Score: 1
      Well, it depends on how it was handled. If one wanted to insist upon case sensitivity with meaning, the compiler would enforce it by issuing a warning or error if the user had incorrect case for a CONSTANT, Method or variable. This would allow current practices to be followed, and in fact would enforce them. In that case, any editor would work, but something with power assist to correct errors would be helpful.

      However, I seriously wonder why we continue to work in languages with complex topology with a text only interface. There have been a few half hearted attempts to develop alternative interfaces to programming, but they tend to dumb down while not really providing "power assist". Some new IDE's can do code folding, structure templating and such, but still really only provide a textual interface.

      Now, it's pretty clear that at the lowest level, text is going to be where it is at... but I can also envision an editor where typing "if" doesn't just type { } else { } for me, but actually made them uneditable framework objects.

      Take this code:

      for (int i = 0; i < splitKey.Length; i++)
      {
      if(i == 0) //Root key
      keyOpened = OpenBaseKey(splitKey[i]);
      else
      keyOpened = OpenSubKey(splitKey[i]);
      if (keyOpened == null) //Failed to open
      break;
      }


      When I type for, the frame should be built. When I typed i, the lack of a matching variable in scope should be detected, and perhaps int type guess, letting me change it (but not omit it!). The conditional should check that splitKey exists in scope, and .Length should be provided as an option by my editor, and nonexistant members should be disallowed. Incrementing could be infered, and togglable.

      Likewise, the if should build boxes where I can insert the actual conditional, and the action on each path. If I don't provide an else, it should be a phantom area where I can at any time provide it, but otherwise acts as if it didn't exist.

      Frankly, an editor like that would make syntax errors impossible to write, because the code would validate on the fly, and prevent an attempt to build until it was corrected (using in scope variables, structure correct, etc). If you do this, you could then automate refactoring, because the editor would "understand" the code. I could invert a conditional, and it would become i != 0, while the two exeuction paths would swap places. I wouldn't be able to accidently delete a brace or parentheses. Arrays would be accessed via [], because I wouldn't be able to type splitKey() without it be corrected. Once typed, the [] would be inaccessable to normal edit commands.

      The trick would be making it do all this and still allowing fluid touch typing to function. I can do a lot of this in emacs, but it doesn't protect the structures it auto-creates for me.

      Then you look at structures like objects, and wonder why I can type inside created frameworks, or I can demolish them with the editor. The framework should remain until I right click that part of the object tree and select delete... not when I backspace too far.
      --
      Sig under construction since 1998.
  67. that's not true by mikemulvaney · · Score: 1

    MyTerm is a class name by convention only. You could define a class called myTerm, and create instances of it called MyTerm. The only thing that case sensitivity buys you here is the ability to have all three at the same time: myTime, MyTime, and MYTIME. There is no rule saying that MYTIME has to be a constant/static member.

    If it was case sensitive, you would have to declare a class called MyTerm (or myterm, or whatever), and an instance called myTermInstance, and call the static variable MYTERM_STATIC or something like that.

  68. Re:An argument for case-sensitivity by E_elven · · Score: 1

    Good points.. the question begging an answer, though, is "Do you have to use different cases if you don't want to?" It seems the OP has no place coding anyway, but if the case bothers them, then why use it..?

    --
    Marxist evolution is just N generations away!
  69. Re:in Holland by bay43270 · · Score: 1

    Sun's coding convention says all package names should be lower case.

    IMHO, Sun should have written some of these conventions into the language as well. They could have enforced at compile time the restrictions that ALL_CAPS are constants, Classes start with caps while variables and methods() don't. Sure they couldn't know the difference between SAXParser and SaxParser, but it would at least keep a most code consistent that way.

  70. Mod parent up by Anonymous Coward · · Score: 0

    Why isn't this guy +5 yet? Mods, do your job, this is good shit!

  71. So ID10T's like you don't do this... by Anonymous Coward · · Score: 0

    PACKAGE COM.MYCOMPANY;

    IMPORT JAVA.IO.*;
    IMPORT JAVAX.SERVLET.*;
    IMPORT JAVAX.SERVLET.HTTP.*;

    PUBLIC CLASS mYsERVLET EXTENDS hTTPsERVLET { // tHIS METHOD IS CALLED BY THE SERVLET CONTAINER JUST BEFORE THIS SERVLET // IS PUT INTO SERVICE. nOTE THAT IT IS POSSIBLE THAT MORE THAN ONE // INSTANCE OF THIS SERVLET CAN BE CREATED IN THE SAME vm.
    PUBLIC VOID INIT() THROWS sERVLETeXCEPTION { // iNITIALIZATION CODE... // sEE E1035 gETTING AND sETTING iNITIALIZATION pARAMETERS FOR A sERVLET
    } // tHIS METHOD IS CALLED BY THE SERVLET CONTAINER TO PROCESS A get REQUEST. // tHERE MAY BE MANY THREADS CALLING THIS METHOD SIMULTANEOUSLY.
    PUBLIC VOID DOgET(hTTPsERVLETrEQUEST REQ, hTTPsERVLETrESPONSE RESP) THROWS ioeXCEPTION {
    pRINTwRITER OUT = RESP.GETwRITER();
    OUT.PRINTLN("a sIMPLE sERVLET");
    OUT.PRINTLN("tODAY IS "+(NEW JAVA.UTIL.dATE()));
    OUT.PRINTLN("");
    OUT.CLOSE();
    } // tHIS METHOD IS CALLED BY THE SERVLET CONTAINER JUST AFTER THIS SERVLET // IS REMOVED FROM SERVICE.
    PUBLIC VOID DESTROY() { // sHUTDOWN CODE...
    }
    }

  72. Re: Who Needs Case-Sensitivity in Java? by Prior+Restraint · · Score: 1

    [I]dentifiers can only use characters from the ASCII subset.

    Wrong. Please read what you linked to:

    Identifiers that have the same external appearance may yet be different. For example, the identifiers consisting of the single letters LATIN CAPITAL LETTER A (A, \u0041), LATIN SMALL LETTER A (a, \u0061), GREEK CAPITAL LETTER ALPHA (A, \u0391), and CYRILLIC SMALL LETTER A (a, \u0430) are all different.

    Unicode composite characters are different from the decomposed characters. For example, a LATIN CAPITAL LETTER A ACUTE (A, \u00c1) could be considered to be the same as a LATIN CAPITAL LETTER A (A, \u0041) immediately followed by a NON-SPACING ACUTE (, \u0301) when sorting, but these are different in identifiers. See The Unicode Standard, Volume 1, pages 412ff for details about decomposition, and see pages 626-627 of that work for details about sorting.

    It then gives examples of identifiers, including one consisting of (in all lowercase): alpha, rho, epsilon, tau, nu.

    (Slashdot appears to filter out non-ASCII and doesn't support HTML entities, so it might not look exactly the same.)

  73. MOD ARTICLE UP by Anonymous Coward · · Score: 0

    (Score: +5, Troll)

  74. You don't write much code do you? by FrostyWheaton · · Score: 1

    The only thing that case sensitivity buys you here is the ability to have all three at the same time

    What case sensitivity buys you is choice. Exactly, you can use the MyVar myVar MYVAR scheme if you like, or the MyVarClass MyVarInstance, MyVarConstant, or MVc MVi MVc, or pretty much anything you wish. But I cannot imagine a useful situation where you would want or need THISVARIABLE to be equivalent to ThisVariable.

    The only thing case insensitivity buys you here is just the slightest bit of idiot proofing (but let's be honest, the kind of people who confuse MyVar with MYVAR would also get Myvariableinstantiation and myvariableinitialization backwards).

    --
    Comments should be like skirts. Short enough to keep your attention, but long enough to cover the subject
  75. Re: Who Needs Case-Sensitivity in Java? by Scarblac · · Score: 1

    Well, duh. Nothing to add to that. Read it wrong...

    That is the killer argument then, Java cannot be case insensitive since u-umlaut would be equal to U, u would be equal to U, but u-umlaut would not be equal to u. No need for the rest of the discussion.

    --
    I believe posters are recognized by their sig. So I made one.
  76. I use modern languages like English by jtheory · · Score: 1

    English is case-sensitive. Letter cases have meaning. Are Democratic principles the same as democratic priciples to you? Why in the world would you want your programming language to be kluged into being case-insensitive? You lose a whole layer of meaning, in a domain where you need MORE precision than you do in spoken communications.

    Visual Basic takes the approach of PHP and some other scripting languages that aren't really intended for complex programming. It's probably okay to be case-insensitive

    Java is designed to facilitate "real" programming, though, so case-sensitivity is a must.

    I think this argument tends to just go away once you start a serious programming project; you need to start following standards for case-usage, which allows stuff like this to make sense: // define Client instance as default (constant)
    Client client = CLIENT;

    You may have seen code out there with "warts" on the beginning of variables (id_variance, xas_serverNames and so on). Those are there because some programmers want MORE information about what they're seeing, besides what they can get from letter-case. Trust me, they don't want to hear that they'll be getting LESS info than even basic ASCII offers then.

    I think most of my other arguments have been explained clearly in other posts... so I'll just second those. Basically, case-insensitivity is a kind of shortcut to help quick-and-dirty scripting with small namespaces. Personally I don't even like that (because you still need to spell the damned variables right - what are you gaining?), but it makes sense in that domain... but that's it.

    --
    There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
    1. Re:I use modern languages like English by kherr · · Score: 1

      English is case-sensitive. Letter cases have meaning. Are Democratic principles the same as democratic priciples to you? Why in the world would you want your programming language to be kluged into being case-insensitive? You lose a whole layer of meaning, in a domain where you need MORE precision than you do in spoken communications.

      My Russian is pretty decent, but I need to polish up on my Polish.

  77. java and lisp by rodentia · · Score: 1


    I have a friend who likes to say that Java is Lisp in C clothing.

    --
    illegitimii non ingravare
  78. Re: Who Needs Case-Sensitivity in Java? by buysse · · Score: 1

    The fact that the current language specification states that only ASCII character can be used for identifiers does not imply that future releases of the JLS will *not* allow Unicode identifiers. Destroying the possibility of future i18n for current convenience does not seem wise to me.

    --
    -30-
  79. Strengths and Weaknesses by Anonymous Coward · · Score: 0

    Every language has strengths and weaknesses; things we like about it, things we don't like.

    Java is case sensitive. You aren't going to change it.

    Grow up and deal with it.

  80. Re: Who Needs Case-Sensitivity in Java? by buysse · · Score: 1

    All older than C, and all built on pre-ASCII systems originally. Punch cards don't have lowercase.

    --
    -30-
  81. Programs are data by scruffy · · Score: 2, Interesting
    And don't confuse this with handling case-sensitive data, which is fine.

    No, you are confused. Programs are data, too. At least they are data to compilers.

    Consider a regular expression. Is it a program or is it data? Many filtering programs will load in a bunch of filters written as regular expressions. Which parts should be case-sensitive or case-insensitive? It turns out that it is relatively standard for lower and upper-case pattern elements to have opposite meanings, e.g., \w matching any alphanumeric character, and \W matching any non-alphanumeric character.

    Interestingly though, LISP historically has been both case-insensitive and a language that allows programs to be easily treated as data. I programmed in LISP for a long time, and the case-insensitivity wasn't any big deal. You'll get used to case-sensitivity and learn to take advantage of it.

  82. ExpertsExchange != ExpertSexChange by CharAznable · · Score: 2, Funny

    Thus, case sensitivity is a Good Thing.

    --
    The perfect sig is a lot like silence, only louder
  83. Well, it'd be easy by jtheory · · Score: 1

    No need for Sun to do anything. Java's compiler is completely available programatically -- you could write a "compiler" that would just convert the input stream from the file into lower-case (avoiding strings and char definitions, or course) and pass it on to the regular compiler.

    No one who knows enough Java to do it has ever *wanted* it, though, which should be a pretty big hint to newbies looking for case-insensitivity in Java.

    Personally, I've seen arguments against case-sensitivity, but I haven't seen any good ones yet.

    --
    Everything should be made as simple as possible, but not simpler. - Albert Einstein

    --
    There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
  84. Re:in Holland by Rip!ey · · Score: 2, Insightful

    This is actually a problem with java ...

    This is NOT possible in Windows NT ...


    Some might argue that this is a problem with Windows, not Java.

  85. English rules by jtheory · · Score: 4, Funny

    In english, the concept of upper and lower case is quite simple.

    I think you mean:
    In English, the concept ...

    (Sorry, couldn't resist...)

    --
    There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
    1. Re:English rules by lokedhs · · Score: 1
      I hope someone with mod points give you what you deserve for that one. :-)

      +5 funny

  86. For much the same reason... by asyky · · Score: 1

    that english is case sensitive.

  87. CAPS-LOCK ON, FULL SPEED AHEAD by XaosTX · · Score: 3, Funny

    GEE, LET ME THINK...WHY DO WE NEED CASE-SENSITIVITY IN A LANGUAGE? COULD IT BE BECAUSE CASE CAN ENCODE ADDITIONAL MEANING? Take the above paragraph as an example. Was I yelling? Sure seems like it. In the same way, additional meaning can be encoded within a programming language by using that little Shift button on your keyboard.

  88. Easy by R.Caley · · Score: 1
    Fact: Case insensitivity means there is one mroe thing you have to describe to give a description of the language (how characters map into equivalence classes, complete with rules for funny accented characters).

    Axiom: Pointless complexity is a Bad Thing.

    Conclusion: Case insensitivity is a Bad Thing.

    --
    _O_
    .|<
    The named which can be named is not the true named
  89. case sensitivity allows by Anonymous Coward · · Score: 0

    greater control over code production.
    as mentioned in uniformity, developers can establish and enforce naming conventions which makes sense.
    these include capitalization for variables, classes, and constants.

    I can't even believe anyone would ask "why have a case sensitive programming language".

  90. Who needs correct spelling in Spanish? by morcheeba · · Score: 3, Funny

    I've just started learning Spanish, and to my exceptional disappointment it is as spelling-sensitive as English. I'd like to ask Slashdot readers to make the case for spelling-sensitivity in a written language, because I can't see it. Although I've used English on and off since 1976, I also have a history of Egyptian heiroglyphics, runatic symbols, street signs, pictographs, and other legacy languages that were never spelling sensitive (perhaps due to the lack of letters in these symbolic languagues). Today I use modern languages including American Sign Language which preserves spelling for pleasing appearance, but is not spelling-sensitive itself (it will correct the case for you in the Word, which is quite nice). In all my years of speaking I have never seen the rationale for making a language spelling sensitive. It simply makes typing it in harder, and mistakes easier, yet we persevere with maintaining it in modern languages like Spanish. Without making this into a religious war, can someone make the argument of why spelling-sensitivity in a language is 'a good thing'? And don't confuse this with handling spelling-sensitive surnames, which is fine."

    1. Re:Who needs correct spelling in Spanish? by jc42 · · Score: 1

      Actually, there was a good discussion of this back in the 1980's, when the DLT (Distribuita Lingvo-Tradukado) project got underway. This was an attempt to use Esperanto as an intermediate language for translation and archival purposes.

      One of the first decisions was a slight change in the capitalization rules: The first letter in a sentence would not be capitalized. This made it possible for software to distinguish common and proper nouns. If there was a capital letter, it was a proper name or acronym of some sort, and thus should not be translated. Lower-case words could thus be unambiguously separated out, parsed and translated, and proper names could be unamiguously recognized as such and not translated.

      German has its own peculiar capitalization rules. But English and Spanish both use capitalization to flag proper names and acronyms. The spoken languages don't have this, of course. But this capitalization is a useful tool in the written languages.

      Programmers in case-sensitive languages are usually quick to take advantage of this sort of distinction. Most programming languages have many classes of words, and it's useful to be able to distinguish them visually. Since upper and lower cases are visually rather different, it's an easy way to make type distinctions quickly visible.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  91. Re: Who Needs Case-Sensitivity in Java? by Prior+Restraint · · Score: 1

    I think there's an ambiguity in the wording of that section. At one point it says (omitting pieces), "The Java letters include uppercase and lowercase ASCII Latin letters, and, for historical reasons, the ASCII underscore and dollar sign." When I first saw that, I reached the same conclusion you did; it was only after reading the whole thing that I saw I was wrong. They really ought to have said something more like, "The Java letters include (but are not limited to)...".

  92. Garbage by TheRealMindChild · · Score: 2, Interesting

    I see SO MANY comments along the lines of: "A real programming language is case sensitive" or "A real programmer uses case properly" Well you know what? Im a real programmer, and I think case sensitivity is retarded. How ambiguous is it if you use a couple of variables, MyName and MYNAME? Quite. Today's geeks seem to be more inclined to jam something into 1 line of perl instead of making their code readable and maintainable, and the ignorant comments on here prove just that. Plain and simple, it is BAD practice to have any variables named the same, even with varying case. It's a different variable, it has got a different purpose, therefore its declaration should be unique. Having to deal with common typing case mistakes is one thing that reduces productivity. If you ABSOLUTELY NEED to have variables of the same name, use namespaces. Thats what they are there for.

    --

    "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    1. Re:Garbage by YomikoReadman · · Score: 1
      Yes, however the counterarguement to this point has already been made, but I'll reply here with it just so you see it.

      While Case Sensitivity might not be an issue if good coding practice is followed, It is included in languages such as Java to help enforce those same standards. I know several people who have taken an Intro to CS class in the last year, and all of the classes were taught with Java, of all things. By selecting a language that has built-in constraints that will enforce good coding practices, you can skimp on that in favor of ensuring that they learn the fundamentals of writing code in any language.

      I hope that helped you understand things a little bit better. Oh, and for the record, I'm also a real programmer, and I'm stuck working in SQL and PL/SQL, which are both utterly case-insensitive, not to mention the fact that they are absolutely unforgiving when it comes to bad code.

      --
      I have no regrets, this is the only path.
      My whole life has been "UNLIMITED BLADE WORKS"
    2. Re:Garbage by TheRealMindChild · · Score: 1

      COBOL forces you to place certain statements in specific columns. To no degree does this "instill good coding practices". The same goes for case sensitivity... what about forcing you to keep everything cased the same way, teach you about the fundamentals of programming? It doesn't.

      You give me no basis for your point of view, other then it is "fundamentals of writing code in any language".

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    3. Re:Garbage by Anonymous Coward · · Score: 0

      It teaches you consistency. Case-sensitive or not, if you called it "count" in one place you should not write "COUNT" or "Count" in another.

    4. Re:Garbage by YomikoReadman · · Score: 1

      Thanks to the AC that beat me on this, but that's pretty much about it. Consistent code is code more easily readable. Readable code is easily maintained by people who didn't write it. My system is well into the Maintenance stage of it's lifecycle, and I've found that there are parts of the software I love working with due to the fact that they are consistent, easily read and followed works of art, while others are about garbage. As for fundamentals, that is the entire point of coding standards. They are the fundamentals of writing good code, and being consistent is one of them, which case sensitivity helps enforce.

      --
      I have no regrets, this is the only path.
      My whole life has been "UNLIMITED BLADE WORKS"
  93. Re:in Holland by Anonymous Coward · · Score: 0

    As far as I know Java can also take Unicode source as input and then the filesystem must also handle that, which would work on NTFS, but not of FAT and probably not on any Unix FS AFAIK.

    Well...
    You know nothing then.

  94. Re:An argument for case-sensitivity by dubl-u · · Score: 4, Insightful

    With DP case sensitvity just gets in the way - the programmers may not be very technical and any maths used would probably only be complicated by use of the 'same' name for different variables. [...] As Java is often marketed as a DP language it's case-sensetivity is a serious drawback (at least as far as DP is concerned - in other areas of Java's use it may be usefull).

    I think a better distinction is between scripting languages and programming languages. Scripting languages are meant for short bits of coding by non-experts. Programming languages are meant for large bases of code built by professionals.

    It's a continuum, of course; no language is used for only one of those. But Java is clearly intended to be pretty far towards the professional end of the spectrum. Non-experts working on small projects should pick a language better suited to their needs; Java will seem to them to be balky and annoying.

    And as an aside: non-experts should stick to small projects. I think the huge danger with scripting languages (in which category I'd include things like pre-dot-net VB) is that although they are great getting non-programmers into doing a little programming, they let people get away with a lot of stuff that is dangerous on larger scales.

    It's as if a guy who successfully changed a lightswitch in his house grabbed his trusty screwdriver and tried to tackle wiring a 500-rack server facility. He might get some stuff working, but it would be flaky, dangerous, and impossible to maintain. Just like so many code bases I've seen put together by "not very technical" programmers.

  95. programming is about consistency by Anonymous Coward · · Score: 1, Insightful

    This is a non-issue. You can bring the same argument and it would not work exactly the same way on strong typing, or you could ask that the compiler catches obvious spelling errors.

    The fact of the matter is, if you had used a variable called foo somewhere, you should have no reason to call it Foo elsewhere and FOO later. No matter if the language allows case sensitivity or not, that would just be bad practice and would confuse the hell out of anybody who would try reading your code.

    Not even going to mention what other posters touched upon, that casing is used to indicate the entity type (constant, variable, class, function etc).

  96. Re:An argument for case-sensitivity by Anonymous Coward · · Score: 0

    I only partly agree with this statement as I think there are two distinct types of programming - the technical, mathematical type and a far less mathmatical 'data processing' (ie pretty forms for putting data in databases) type of programming.

    With DP case sensitvity just gets in the way - the programmers may not be very technical and any maths used would probably only be complicated by use of the 'same' name for different variables.


    Then if "the programmers aren't too technical", they probably don't know where the shift key is anyway. Don't like case-sensitivity? Simple: write everything in lowercase.

  97. OK a long as variables are declared by hey! · · Score: 1

    As somebody else pointed out, there are some fields such as mathematics or physics where lower and upper case have well established distinct meanings, e.g. g for acceleration and G for the gravitational constant.

    However, I think that for the vast majority of applications, case sensitivity is just a minor irritation. CamelCasing is a good thing; however the effort used to drum this into novice programmer's heads would be better spent in drumming more significant stylistic principles.

    I'd say as a general rule, if we choose our language not to be case senstive, we should enforce variable declaration. If we choose to be case sensitive, then creation of things that differ only by case should generate a warning unless the compiler is told to suppress these warnings by a directive.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  98. Try Eclipse by Anonymous Coward · · Score: 0

    Java is case sensitive and I don't mind. But if it bothers your, try Eclipse; it should help you a great deal.

    Eclipse is a free IDE from IBM.

  99. WHO NEEDS IT by NReitzel · · Score: 1

    LOTS OF OLDER COMPUTER LANGUAGES AND SYSTEMS DIDN'T NEED OR USE LOWER CASE LETTERS, LET ALONE LATIN-1 OR UNICODE. DOS FILE NAMES ARE NOT CASE SENSITIVE NOR ARE THE FILE NAMES IN IBM'S OS/2. USING LOWER CASE IS SILLY. THOSE OF US WHO ARE ANCIENT PROGRAMMERS DON'T NEED NO STEENKING CASE SENSITIVITY.

    -- Norm Reitzel

    --

    Don't take life too seriously; it isn't permanent.

  100. lowercase means instance not Class ? by gomel · · Score: 0
    Today I use modern languages including Visual Basic

    you have to deal with this rubbish, too?
    i'm currently working with VS.NET. it has auto-creators, which generate some needed code. That is fine, but the name choice!? look at this real example:
    Friend WithEvents DataSet11 As WindowsApplication1.DataSet1
    well, DataSet1 (character "1" at the end ) is a Class, and DataSet11 (eleven) is a variable.

    the difference is one frickin character, which actually looks like a typo. it could as well be lowercase("L") or uppercase("i"):
    DataSet11, DataSetl1, DataSetll, DataSet11 , DataSetl, DataSetI, DataSetI1l
    if the language was case-sensitive it would be enough to write :
    Friend WithEvents dataSet As WindowsApplication1.DataSet
    if you write your code so that OTHER people can read it, then use case-sensitive languages. and WikiSpell your instances.
    dataSetOne, dataSetTwo, dataSetTemporary, dataSetWhatEver
    --
    Fight Frist Psoting!
    Browse Slashdot with 'Newest First'!
  101. Ahh, CodeWarrior... by Vaevictis666 · · Score: 1
    We had problems like this in one of my college classes (4th year no less) - the prof did up his framework code for the assignments using MetroWerks Code Warrior on the windows boxes, which is apparently quite lax on the case-sensitive side of things for package names and directory names, among other things.

    When we got the assignment (the first 2 in fact) they just wouldn't compile as-is on the unix boxes we usually worked from. Pissed a lot of us off because we had to fix the problems :(

  102. What a ridiculous question. by David+Kennedy · · Score: 1

    Slashdot has utterly lost any credibility it might once have had in the serious programming community, but honestly, this must be the nadir.

    I'm not even going to try and list arguments FOR case-sensitivity, rather, I'll ask for substantial arguments against. The original poster had none.

  103. Why don't you just do it yourself? by confu2000 · · Score: 1

    If you want case-insensitivity in your compiler, why don't you just preprocess your file to change all keywords (ie, anything that isn't a string) to lower case? Surely this can't be that hard. I'd imagine there's probably a way to integrate it into gcc even as some custom preprocessor.

    Or alternately, how about just using lower case when you write your sourcefile? If you don't want case-sensitivity because it's harder, why would you bother using capitals in the first place? Just stop using the shift key.

    Do that for a while and see if you get caught with a SetsLower/SetSlower case. If you don't, all good. If you do, now you know why people bother.

  104. Simple by Ryosen · · Score: 1

    The reason for case-sensitivity is rather simple when you consider how a compiler works. Each variable/constant name is converted to a token based on its ascii representation. As the letters 'a' and 'A' both have different ascii values, the amount of work required on the part of the compiler or at run-time to convert the cases would far exceed the inconvenience of not being allowed to munge the readibility of the code. Essentially, the compiler would have to shift the case of each letter of each variable (either to all lower or all upper) every time the code was compiled. Given that a program can contain hundreds of thousands of lines of code (if not millions), this can have a very significant impact on compilation time.

    --

    Ryosen
    One man's "Troll, +1" is another man's "Insightful, +1".
    1. Re:Simple by Anonymous Coward · · Score: 0

      Even worse: Unicode, as others have pointed out.

  105. consistency by Anonymous Coward · · Score: 0

    Search for consistency in the entire thread.

    Related keywords: naming conventions, coding style.

    Just because you can refute a set of incorrect arguments does not imply that what they defend was wrong.

    Brief: if you respect a language's coding style, you will never encounter problems with casing. You SHOULD respect a language's coding style so your code is easily read and understood by other programmers in the same language.

    If you program for yourself and really want to use your own conventions then you are on your own, don't ask the entire world to forget their standards so you can write unparsable code.

    1. Re:consistency by zero_offset · · Score: 1
      If you program for yourself and really want to use your own conventions then you are on your own, don't ask the entire world to forget their standards so you can write unparsable code.

      That's a circular argument. If it wasn't case sensitive, it wouldn't be unparsable.

      So which is better? Code that will compile fine because I accidentally typed For(i=0;i or the miraculous gift of consistency and readability that is for(i=0;i? (I can make ridiculous arguments, too.)

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    2. Re:consistency by Anonymous Coward · · Score: 0

      unparsable by the rest of the programming community for that particular language, I meant.

      As for the other question, I don't think it's ridiculous unless you are a programmer, but take a look at this post for one of the answers.

    3. Re:consistency by zero_offset · · Score: 1

      I find it a bit ironic that you failed to capitalize the word "unparsable" in your sentence. A distinct violation of the well-established capitalization rules of the English language. Thankfully, I was still able to parse your meaning.

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

    4. Re:consistency by Anonymous Coward · · Score: 0

      it's only ironic if you believe that every logical person must speak like Data :)

  106. Re:in Holland by spitzak · · Score: 1

    If you name two classes with different case only, I think that can be considered bad enough practice that it is ok that you can't store both of them.

    However case dependece is vital so you can name a variable and a Class with different case. It would be incredibly annoying if I wanted one instance of the Class "Rectangle" and I was unable to call it "rectangle". The only alternative to case dependence is to change the syntax of the language so that at any point in parsing it can know if a type or id is expected, that would greatly restrict the expressiveness of the language and add annoying extra required keywords.

    Storing anything other than UTF-8 in filenames is an incredible mistake, and whoever at Microsoft did that should burn in hell. All Unix systems such as Linux fortunately use UTF-8.

  107. Re:in Holland by bill_mcgonigle · · Score: 1

    As far as I know Java can also take Unicode source as input and then the filesystem must also handle that, which would work on NTFS, but not of FAT and probably not on any Unix FS AFAIK.


    HFS+ should be able to handle it.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  108. Missing the point by yishai · · Score: 2, Insightful
    A lot of responses to this miss the point entirely. Case sensitivity has a serious cost: Bugs. And most notably, debugging time. Countless hours of programmer time have been wasted due to case sensitivity. It makes very hard to find bugs.

    Consider this snippet of java code:

    try {
    doSomething();
    } catch (TransactionRolledbackException e) {
    recover();
    }
    And yet you see TransactionRolledBackException propagating to a higher level. You have looked at the code and swear you are catching it. Oops, missed that upper case B.

    Arguments that you can do something like this:

    Object object = new Object();
    are irrelevant. This is also perfectly legal in java:
    Object Object = new Object();
    Case sensitivity does nothing to enforce preferred conventions, and actually enforces unreadable code.

    Would I like to read code that says System.arrayCopy(...), or Color.BLACK ? Sure I would, but that wouldn't compile. Case sensitivity enforces the wrong thing (literal consistency) rather than convention (conceptual consistency).

    Would I like to rename that class which someone called subProductPanel to SubProductPanel? Sure I would, but that would involve changing the 15 classes that reference it, not to mention the file name, which would confuse CVS on windows clients terribly.

    So I am stuck with my subProductPanel class name without more effort that it is worth to fix, because of case sensitivity. If everything was case insensitive, then I would be able to change it easily.

    As for portability, case sensitive and case insensitive are incompatible and equally create portability problems. Windows having a case insensitive file system causes limitations in Java's portability because Java considers MyClass and myClass to be two separate names needing two separate files. Windows will not support that. So Java code that runs on Linux will not work on Windows, and vice-versa (think about code which reads from the file system).

    Bottom line:

    Case sensitivity creates an environment condusive to hard-to-find bugs because people aren't case sensitive. They may notice case when it is out of place, but not normally.(sOMEtHINgouToFplACE vs. somethingOutOfPlace will be noticed. Not, however someThingOutOfPlace or SomethingOutOfPlace and only programmers consider SOMETHINGOUTOFPLACE different).

    A case sensitive environment enforces only the non-use of conventions. A case insensitive environment lets you use the convention even if the author of the API forgot to.

    As for BasicSend vs. BasicsEnd, that is an argument to use something other than case to differentiate words, not just hoping that people notice the difference. Wouldn't Basic_Send and Basics_End be much better?

    As for differences in how languages handle case insensitivity, String.toLowerCase() figures it out, so would the computer language. You establish rules and stick to them. Will a language which targets the English speaking get all other languages right (the way most speakers of that language would intuit)? Probably not. That doesn't mean that the target audience has to spend thousands of hours chasing down unnecessarily hard to find bugs.

  109. VB's "case insensitivity" is a nightmare for scc by Fat+Cow · · Score: 1

    VB's case insensitivity is OK. My problem with it is that it corrects the case of stuff that you type in.

    so if you type "abc", it will search around looking for an "abc" and change your typed in word to match one of the ones it finds. It's unclear to me how it chooses it's model.

    2 problems with this:
    - what if you don't like the model it chooses? you have to go through the entire project changing them one after the other until you find the "master model" and then they all change

    - it's possible to load up the project with one of the files writable, change a line of (unrelated) code, check the differences before you check the file back in and VB has picked a frikkin variable name and changed the case on every instance of it, generating a load of spurious diffs

    --
    stay frosty and alert
  110. The first principle of programming by Brandybuck · · Score: 1

    The first principle of programming is accuracy. Case sensitivity probably wasn't a deliberate conscious decision, but merely a side effect of this principle. That the language designers should incorporate a mechanism to aid in inaccuracy never occurred to them.

    My advice: get over it. If you can't even handle the minimal accuracy that case sensitivity demands, then perhaps programming is not for you.

    --
    Don't blame me, I didn't vote for either of them!
  111. Why? For me, an expanded namespace is important by jungd · · Score: 1

    An illustrative (if nonsense) piece of code typical of the style I may write: (this is C++ - but the argument is the same)

    class Fruit
    {
    public:
    Fruit(const Apples& apples) : apples(apples) {}

    const Apple& apple(int i) const;
    Apple& apple(int i);

    protected:
    typedef List<Apple> Apples;
    Apples apples;

    ...
    };

    Fruit fruit;

    Now imagine, having to think up more illogical and less descriptive names because Apple, and Apples, and Fruit are already taken! I'd hate if my constructor arg couldn't be called apples too - that what it is. Java forces me to write this.apples = apples. I hate having to prefix with '_' or worse 'm_', as it just makes more work during reorganization/refactoring etc.

    It already disturbs me that I can't use the same name for a method and a field. I'd like to be able to write code like:

    class MyClass
    {
    public:
    MyClass(const Any& value) :value(value) {}

    const Any& value() const { return value; }
    Any& value() { return value; }

    private:
    Any value;

    };

    Unfortunately, C++ can't tell 'Any value' from 'Any value()'. At least in C# I can use a property - but I still can't utilize the same name :(

    --
    /..sig file not found - permission denied.
  112. Why Have Case In English? by j()nty · · Score: 1

    Well I guess what I really mean is why have different shapes for uppercase and lowercase of the SAME letter?

    I can see how a large letter at the start of a sentence makes it easier to scan text.

    But why isn't A just a large version of a? Why does H have more ascenders that h? Why does D face in the opposite direction to d? And what has G got to do with g?

  113. Re:in Holland by tigersha · · Score: 1

    > If you name two classes with different case only, I think that can be considered bad enough practice that it is ok that you can't store both of them.

    Fair enough, but I was pointing out that Java's habit of forcing a directory structure for packages has the effect of having to force the language to use similar naming conventions as whatever filesystem lies underneath.

    > However case dependece is vital so you can name a variable and a Class with different case.

    This is a valid point, and a good argument fo case sensitivity, btw. Prolog does somthing like tis, varibles are force to use uppercase, symbols forced to use lowercase. Some people hate it, but some people also hate Python's indented code as delimiters thing. A matter of taste, I suppose. Since Java uses naming conventions to indicate semantics in lots of places (Java beans awith getters and setters being the prime example) such a convention might be in place here, as a previous poster indicated.

    > Storing anything other than UTF-8 in filenames is an incredible mistake, and whoever at Microsoft did that should burn in hell.

    NTFS uses Unicode for pathnams and was AFAIK the first filesystem to do so. FAT was invented before UTF8 so it has an excuse :)

    > All Unix systems such as Linux fortunately use UTF-8.

    So I live and learn :

    --
    The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  114. apparently it is contagious by Anonymous Coward · · Score: 0

    You are actually making an argument for case sensitivity. For one, the snippet you mentioned wouldn't even compile in Java unless someone defined both exception spellings as different classes, and if someone did that he doesn't deserve to call himself a programmer. Other than that, case sensitivity makes it easier to find bugs, and take it any way you wish, but if you actually programmed in any serious language you would have already known that.

    Were naming conventions properly followed, case sensitivity should never be an issue. I noticed that most "programmers" who take an issue with case sensitivity do so because they prefer to force the coding style of a language they know to one they are learning, and is mostly because they are used to "carefree" naming. Your example's point is that if you mistype (which arguably could also be misspell) a variable name, it should still work. I doubt that many people who actually make a living off writing code feel the same.

    And one final note regarding the part with renaming the class. When you make modifications to someone else's code it is good practice (and common sense, I might add) to follow that person's conventions whether you like them or not. So you shouldn't start renaming things in the entire source just because you didn't like their casing.

    1. Re:apparently it is contagious by yishai · · Score: 1
      You are actually making an argument for case sensitivity. For one, the snippet you mentioned wouldn't even compile in Java unless someone defined both exception spellings as different classes, and if someone did that he doesn't deserve to call himself a programmer. Other than that, case sensitivity makes it easier to find bugs, and take it any way you wish, but if you actually programmed in any serious language you would have already known that.

      That "someone" is the Java community process. Both class names are exception classes in J2EE. One is in javax.jms and the other in javax.transaction.

      And one final note regarding the part with renaming the class. When you make modifications to someone else's code it is good practice (and common sense, I might add) to follow that person's conventions whether you like them or not. So you shouldn't start renaming things in the entire source just because you didn't like their casing.

      It doesn't need to be someone else's code. What is wrong with it is that it breaks the convention of the project. Each programmer on a project is not free to make up their own conventions, typically, and when they do make a mistake (inevitable really) once in a while, it is nice to correct it. Case sensitivity makes it harder to follow the convention in that case, because it forces errors to compound.

      Granted, I am assuming a project where programmer care about the convention. If they don't care, then case sensitivity helps the lack of caring, a little.

    2. Re:apparently it is contagious by Anonymous Coward · · Score: 0

      It doesn't need to be someone else's code. What is wrong with it is that it breaks the convention of the project. Each programmer on a project is not free to make up their own conventions, typically, and when they do make a mistake (inevitable really) once in a while, it is nice to correct it. Case sensitivity makes it harder to follow the convention in that case, because it forces errors to compound.

      I would think that in the case you describe you would still want to correct the mistake entirely by replacing all occurrences, and not just begin using the fixed casing like nothing happened. Inconsistent case for the same variable makes the code considerably slower to read if you mean to understand it. I believe that is because the brain recognizes entire words at once, and since "var" looks different from "VAR" you will have more difficulty scanning for all varieties at once, problem compounded by the fact that as you read the code, you usually memorize the variables encountered. I hope this makes sense.

      As for the java issue I am thinking the naming might be intentional and might have been done to allow people to import both classes in the local namespace without a conflict. I don't think this should happen too often, but you can always use the full class name to refer to either of them.

  115. wrong by Anonymous Coward · · Score: 0
    Would I like to rename that class which someone called subProductPanel to SubProductPanel? Sure I would, but that would involve changing the 15 classes that reference it, not to mention the file name, which would confuse CVS on windows clients terribly.

    So you are saying you would rather prefer the code to use subProductPanel in some places and SubProductPanel in others for the same variable ? And if some other guy comes after you and decides he will use SUBPRODUCTPANEL that is ok too ? The reasoning for this being what, exactly ? That you don't like the person's coding style therefore you'd like your additions to stand out in their own way ?!

  116. Why? by sfjoe · · Score: 1

    ... because I said so. Now go to your room.

    --
    It's simple: I demand prosecution for torture.
  117. Case for insensitivity by stanmann · · Score: 2, Funny

    Most programmers are male, Many are ADD, some are dsylexic. Most can type almsot as fast as they think. MY pinkie raNdomly pushes shift without being asked TO. ANd sometimes doesn't release it when asked to. I Alsso sometimese accidentally double letters. Case insensitivity with a case aware IDE allows me to focus on What the Foo I am doing with BAR without worring about which foo I baR. I tend to Trust my IDE to let me know during code review... before I complie that I didn't put those letters in the write order. I use a modified version of MS's Hugarian notation for variables so that clsFOO is different from szfoo and clsszfoo is something else entirely...

    --
    Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
  118. Re:in Holland by anarxia · · Score: 1

    Most packages are bundled in jar files so the case sensitivity problem is a non-issue at runtime. The programmer can always fix those kind of problems for compiling the package during development (if he/she is working on Windows). Java identifiers are limited to ASCII 7bit so it doesn't make a difference if the filesystem supports unicode or not. The contents of the source files themselves (string literals, comments etc) can be in unicode but they don't have anything to do with the filesystem.

  119. Re:in Holland by npsimons · · Score: 1
    HFS+ should be able to handle it.


    HFS+ is not a UNIX filesystem.

  120. Re:in Holland by npsimons · · Score: 1
    NTFS uses Unicode for pathnams and was AFAIK the first filesystem to do so.


    I doubt it. Although I can't find any evidence, I'm willing to bet that HPFS supported Unicode. And HPFS was around before NTFS. NTFS is supposedly derived from HPFS.

  121. Simple Answer by querencia · · Score: 1

    There are only 26 letters in the alphabet. Some platforms (like old Mac OS) have a file length limit (31 characters, for example). Since Java stores class files in a file by the same name, this means that class names can only be 26 characters long (minus the ".java")

    So, for a programmer like me, I must have case sensitivity. Otherwise I am limited to somewhat more (because of use of non-alphabetic characters) than 6.156119580207158e+36 class names. Clearly inadequate.

  122. One thing of note by blate · · Score: 1

    Regardless or your view of case (in)sensitivity, one should not rely on case sensitivity when programming.

    More specifically, IMHO, one should not have two variables or methods/functions which differ only in their capitalization, with very few exceptions. It's too bloody error prone and too hard to catch.

    Some would argue that this is an example of why case insensitivity is a good thing. I disagree -- case sensitivity forces you to think about how you name your identifiers and can, in principle, lead to more readable code, due to the consistency thereby enforced.

  123. Because Java uses Unicode by GCP · · Score: 2, Insightful

    ASCII has a relatively simple, consistent mapping from lower- to uppercase and vice versa. Letters all have a single upper-lower 1:1 pair, while all others are caseless and upper and lower are the same. It's a simple map.

    But ASCII is obsolete. Java doesn't use it, even for variable names. When you go beyond ASCII, you have many different case maps to choose from. Different cultures have different case equivalency rules, some of which are rather complicated. And then, as others have mentioned, there are the coding conventions that make use of casing to make distinctions, but these conventions ride on top of the cultural conventions regarding which distinctions matter. (I don't want to get into the details, but what one man considers a single letter another might consider to be two, for example.)

    You can avoid all of these thorny cultural disagreements by either limiting all identifiers to ASCII with its single equivalency map, or by just making the rule that identifiers are the same if and only if they are composed of the same sequence of characters and avoiding the issues of equivalency maps altogether. (Until you get to normalization, which is another can of worms....)

    Since Java allows a much wider range of characters in its identifiers than the puny ASCII character set, it chose the second option: ignore equivalency maps and declare that "if it's not the same, it's different".

    --
    "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
  124. Re:An argument for case-sensitivity by Frizzle+Fry · · Score: 1
    the question begging an answer, though, is "Do you have to use different cases if you don't want to?"

    Yes, if you have the job of maintaining code that uses different cases.
    --
    I'd rather be lucky than good.
  125. Dude, if you're going to be a programmer... by aquarian · · Score: 1

    ...you need to learn how to type!

  126. Re:in Holland by bill_mcgonigle · · Score: 1

    HFS+ is not a UNIX filesystem.

    Funny, Apple's Unix runs on it. Linux can use it (probably no Grub support yet).

    Unless you mean to differentiate UNIX (tm) from Unix (philosophy)?

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  127. You must be a newbie ;-) by weeboo0104 · · Score: 0

    CASE SENSITIVITY IS IMPORTANT BECAUSE IT LOOKS LIKE YOU ARE YELLING WHEN YOU TYPE IN ALL CAPS

    (It's also important because if you don't type with lower-case letters mixed in to your Slashdot post, you'll never get past the lameness filter)

    --
    It is easier to build strong children than to repair broken men. -Frederick Douglass
  128. Re:An argument for case-sensitivity by E_elven · · Score: 1

    "It seems the OP has no place coding anyway, -- "

    Unless, of course, he maintains code like this:

    int main(int argc, char * argv[])
    {
    sOmE_TYpeOfMiNE VaRiAbLe_SoMeTYPEofMiNe;
    return 0;
    }

    --
    Marxist evolution is just N generations away!
  129. It's Just Byte Code, DIY by rimu+guy · · Score: 1

    As you probably know there are a ton of languages that will compile down to Java bytecode and run on any JVM (e.g. jpython).

    So why don't you just grab an OpenSource Java compiler and add a --case-insensitive compile switch?

    You could then code merrily in whatever case your caps lock key happened to be set in, and it would run on anybody's JVM.

    Or just suck it up and get used to case sensitive programming like the rest of 3 million Java developers

    ---
    JaVA hOSTing on a lINUX vps

  130. Re:in Holland by The+Cydonian · · Score: 1
    If you're saying that FAT doesn't take Unicode filenames, then I disagree. I run WinXP with a FAT-32 filesystem on my laptop, and I have no problems in naming my files in Unicode characters.

    Haven't named any Java packages in Unicode though, so don't know about that.

  131. Re:History (Mac OS X tip) by Anonymous Coward · · Score: 0
    One of the reasons that the project I'm working on isn't using Macs is that OSX uses a caseless file system.

    Yes... by default. UFS is also somewhat supported and case sensitive. Also, (as of Panther) we see this in newfs_hfs's man page:

    -s Creates a case-sensitive HFS Plus filesystem. By default a case-insensitive filesystem is created. Case-sensitive HFS Plus file systems require a Mac OS X version of 10.3 (Darwin 7.0) or later.
    Of course, this won't help you if you're trying to deploy a product to the masses (users don't like developers formatting their disks for some reason), but for in house/personal use it WorksForMe(tm).
  132. Unicode, Empirical Studies, Java Cert Questions by cyranoVR · · Score: 1

    I suspect the answer is very technical and involves the Unicode standard.

    Also, I remember reading that java was designed as a "language focused" language - meaning that Best Practices of programming language design was their first priority. There have undoubtedly been studies demonstrating that consistent text case improves code comprehension and increases efficiency (ok, I don't have a link to such a study, but after reading Code Complete, I have to believe it exists).

    Finally, case-sensitivity makes for some really tricky (and annoying) questions on the Java Programmer Certification exam.

  133. Define UNIX(R) by tepples · · Score: 1

    By Apple's UNIX, do you refer to the old A/UX (which carries the UNIX(R) mark) or to Mac OS X (which does not carry the UNIX(R) mark)?

    1. Re:Define UNIX(R) by bill_mcgonigle · · Score: 1

      By Apple's UNIX, do you refer to the old A/UX (which carries the UNIX(R) mark) or to Mac OS X (which does not carry the UNIX(R) mark)?

      No, HFS+ wasn't around when A/UX was out. That's why I referred to "Apple's Unix", not "Apple's UNIX". :)

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  134. Re:An argument for case-sensitivity by neilio · · Score: 2, Insightful

    IMHO it helps enforce coding consistency. Very helpful when writing and debugging code. If you wrote a program using hungarian notation and say use:
    String arrMyArray[5]; //my java is rusty

    It is easier if case sensitivity won't let the lazy type arrmyarray[x]. It almost disappears in the text. When debugging and examining code, consistent variable names help you pick stuff out of the fray, visually, easier.

    I am a huge fan of languages such as C and java which are fast, strongly typed, and rigidly enforce consistency in referencing variables.

    Slop=hard to maintain.

    Imagine reading a book where the case is all whacked. It wouldn't be as easy.

    neilio

  135. One Artgument for Case INsensitivity by cookiepus · · Score: 3, Interesting

    As someone with history of Java, who does C now, I instinctively want case sensitivity. If I did not have to use case, I still would. Ie, all my variables would be myStruct even if I could reffer to it as mySTRUCT and MYstrucT and whatever. So lack of compiler enforced case checking wouldn't make code less readable.

    One benefit I would get out of C being case INsensitive is this:

    I often link fortran and C objects together. For those of you who don't know, fortran is case insensitive, but when it is compiled, all function symbols are compiled as lower case with an _ attached to the end. So if in my fortran file I have a subroutine called MYstupidFORTRANroutine, and I wanted to call it from C, I would need to extern mystupidfortransubroutine_ (lowercase with the attached ampersand)

    Which is fine.

    Now here's the problem. When I do a function call from Fortran (something like CaLL MyStuPiDcSUBrouTINE) the compiled code actually calls a function mystupidcsubroutine_ . That means that in C, I must name my function mystupidcsubroutine_ (all lower case with the ampersand) in order to have it callable from fortran.

    Now, life would be simpler if all the compiled symbols became standard and case insensitive accross all languages. That would allow us to link objects together and have functions callable from one language to another. Since this one case insensitive name would have to be standardized (eg: always make it lowercase with _) then the language would have to be case insensitive as well, because otherwise myFunction and MYFUNCTION would be different symbols but must share a common name - impossible.

    This isn't really a super-strong argument for case insensitivity, but it's a possible one. Personally, I would still keep my code consistent whether I had to or not (when I write fortran code I do it even though I don't have to. it bothers me to see fortran code SHOUTING AT ME) And I would not agree that having variables called FOO Foo and foo in your code refering to different things isn't too good. Though I guess a function taking a string argument "file" and opening the global file pointer FILE to that "file" is kinda reasonable.

    1. Re:One Artgument for Case INsensitivity by Anonymous Coward · · Score: 0

      Basically your argument is "Fortran and C are incompatible, so we should make C compatible with Fortran".

      But why not make Fortran compatible with C instead?

  136. except if the langauge auto-registers it by abandonment · · Score: 1

    >>It won't be considered a different variable, it >>will be considered an undeclared variable. The >>compliler will choke on it. with certain settings, languages like php will automatically register a mistypes variable (instead of Foobar popping an error when you mean to type FooBar, php will automaticaly create a new variable Foobar). This has caused me alot of debugging time as a a result of typos because of this... of course a properly-secured php setup won't allow this, but by default php will allow this - and cause you problems either way. i am personally FOR case-sensitivity, you can tell a lot from a proper naming convention using case-sensitivity. plus 'most' operating systems (with one major difference) will properly enforce case-sensitivity for files your program may be accessing (or compiling), so this should carry across to the programming language for the most part.

  137. Unicode problem, so what's the solution? by tepples · · Score: 1

    That's a Unicode Problem.

    Then how would you solve it? Remember that identifier names in some languages may have diacritics as well as case. Would you consider two vowels with different diacritics equivalent, just as you consider two vowels with different case equivalent? In fact, some pairs of distinct lowercase strings may upcase to the same string. For instance, both German ss (two letters) and s-set (a ligature that rather resembles a Greek lowercase beta) upcase to SS (two letters), and both English fl (two letters) and f-l (a ligature) upcase to FL.

  138. Unicode by tepples · · Score: 1

    As for the red and blue argument, last I checked we were working with plain text files.

    Plain text files in UTF-8 encoding can contain characters in all sorts of scripts. Many scripts do not have an upper and lower case. Some other scripts do have upper and lower cases, but the rules for converting a string to upper and lower case vary from language to language within the script and can prove much more complicated than those of English. Would you want to have to use some sort of markup around the names of identifiers to specify the language whose rules for case-normalization the compiler should use for that identifier?

    [In the Java programming language,] is MyThing.init() calling a static method on the MyThing class, or are we calling an instance method on an instance?

    That's Java. C++ distinguishes static method calls (with ::) from instance method calls (with .). This type of operator might more readily lead to a similarly-syntaxed language without case sensitivity among ASCII characters.

  139. Other languages? by tepples · · Score: 1

    if somebody tells you, "I can take a plain text file"

    Written in what human language? If the file is source code, with identifiers written in what human language?

    you don't pause to ask for a laundry list of capitalization rules, do you?

    Yes one does. Please read the Unicode standards. Not all languages have encodings where upcasing a character is as simple as & 0xe0.

    1. Re:Other languages? by Anonymous Coward · · Score: 0

      upcasing a character is as simple as & 0xe0.

      You probably meant & 0xef, right?

  140. CORRECTION by tepples · · Score: 1

    No, I meant & 0xdf. I just went and checked on my calculator. Sorry for the confusion.

  141. That's a bit foreign by tepples · · Score: 1

    I am opposed to the base language forcing case-based standards.

    Virtually all human programmers write identifier names in some sort of human language. Not all human languages share the same script, and even within one script, they do not share the same case folding rules. The Java language permits identifier names in any of several scripts of Unicode. In what language does a Java programmer whose first language is not English write identifier names? Can you cite all the case folding rules for those languages, including changes in diacritics and even breaking of ligatures?

  142. i18n? by Anonymous Coward · · Score: 0

    With DP case sensitvity just gets in the way

    How do you expect to solve it and maintain internationalization? Programmers use human languages for identifier names, and not all human languages upcase trivially.

  143. (not (eq? 'set-slower 'sets-lower)) by brlewis · · Score: 1

    Scheme is specified to be case insensitive. However, everybody sticks to a convention of all lower case, with dashes separating words. I've been using a case-sensitive (thus non-conforming) implementation of Scheme for years and only noticed its non-conformity recently.

    I'm neutral as to whether case-sensitive or case-insensitive is better, but I think you should retract your SetSlower vs SetsLower argument.

  144. Re:An argument for case-sensitivity by Anonymous Coward · · Score: 0

    Holy Crap! Are you seriously arguing for programs that use both E and e as variables??? Jebus, I hope I never have to maintain your code.

  145. It is not "made" case sensitive. by llzackll · · Score: 1

    The case sensitivity is just natural. It is not really something that was implemented. In fact, case insensitivity is what would have to be implemented.

  146. Aids and AIDS by Anonymous Coward · · Score: 0

    Does anyone still have one of those old Hewlett-Packard keyboards that had a key marked AIDS?

    You can date them quite accurately, from the time they had to start calling that key something else.

  147. English Case Sensitivity - Trivia by Embedded+Geek · · Score: 1
    Many natural languages have case-sensitivity

    I recall that there is only one word (well, pair of words) in English that changes not only its meaning but also its pronunciation when it changes case: "polish" vs. "Polish"

    Of course, the fact that this merits mention in a trivia book (where I found this tidbit) indicates how in general English is case insensitive.

    --

    "Prepare for the worst - hope for the best."

  148. Coding Standards by Anonymous Coward · · Score: 0

    I would suggest obtaining a little book called :
    Java Style Guide. A little green pocketbook that
    covers the how and the why of code style.
    It explains Java's reason for case-sensitivity
    quite thoroughly.

  149. Dear Slashdot by vidnet · · Score: 1
    I'Ve JuSt STarTed learninG JAVA, And tO my eXCEptiOnaL dIsaPPointmEnT iT IS aS cASE-senSITIve AS c...

    No, I can't see the point either.

  150. Makes programming possible in Turkish by Cardbox · · Score: 1

    There is no universal algorithm for case-matching or case conversion.

    In most languages, the capital version of i-with-a-dot is I-without-a dot and the lowercase version of I-without-a-dot is i-with-a-dot.

    In Turkish, the capital version of i-with-a-dot is I-with-a dot and the lowercase version of I-without-a-dot is i-without-a-dot. More logical.

    So any program that enforces case matching and case conversion will not work the same on all computers.

    Makes you wish the Turks had stuck to Arabic script and not changed to Latin in 1922. Except that Arabic was even more useless for the Turkish language than Latin is...

  151. Person vs pErson vs PerSon by AuraSeer · · Score: 1

    Case-sensitivity is often used to distinguish the kind of thing a symbol refers to.

    Person is the name of a class.
    perSon is the name of a function, which performs an operation once for each male child of a certain parent.
    pErson is a pointer to an Erson object, if your language has pointers. (Okay, I'm reaching here, but assume "Erson" means something to the programmer.)

  152. A bird in the hand... by gardyloo · · Score: 1

    i) ...is worth two in the bush.
    I) ...is worth two in the Bush.

    Which do you prefer?

  153. Re:in Holland by npsimons · · Score: 1
    Funny, Apple's Unix runs on it. Linux can use it (probably no Grub support yet).


    Funny, Apple's "UNIX" resembles UNIX about as closely as it resembles Mach and microkernels or MacOS9. And just because Linux can use it doesn't mean it's a UNIX filesystem. Linux can use FAT.


    Unless you mean to differentiate UNIX (tm) from Unix (philosophy)?


    That is also a valid point, in that HFS+ definitely does not follow the UNIX philosophy.

  154. If this is your only gripe then stick to stupid web tricks with Javascript.

    --

    public final transient String president = DUBYA;
  155. Re:in Holland by ads.osdn.com.blocked · · Score: 0

    org.foo.Bar.bleh must be in org/foo/Bar

    this is perfectly possible. The class Bar has a member bleh, it resides in package org/foo

    org.foo.bar.Bleh must be in org/foo/bar

    this also is fine. The class Bleh resides in package org/foo/bar

    --

    public final transient String president = DUBYA;
  156. There is a Language that is Not case Sensitive? by Anonymous Coward · · Score: 0

    In any given day I may code in half a dozen different languages (PHP,ASP-VBSCRIPT,Python,Javascript,SQL-MySQL :: SQL-Oracle) maybe a few more, it has gotten to the point that I often don't have a clue which ones are case sensitive and which are not, I just always treat everything as if it was case sensitive, and only in parsing text do I bother to check.

    Heck I just got back into programming PHP for the last two weeks. I and thought it was case sensitive. Good Coding Practice almost makes the Case thing a non issue.

    When I learned python it took about a month before I had my first bug due to case, I always thought it was just case in-sensitive.

    Longer story short, just make a good habit of keeping Case the same and this whole issue kind of disappears.

  157. Re:in Holland by bill_mcgonigle · · Score: 1

    And just because Linux can use it doesn't mean it's a UNIX filesystem. Linux can use FAT.

    FAT can't preserve Unix semantics, HFS+ can. How else do you define a Unix filesystem?

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  158. no java for me. by Anonymous Coward · · Score: 0

    i gave up learning to programm
    in java because my first "hello world"
    didn't want to compile. just because
    of the "case sensitivity".

    i would rather have good names for variables, etc.
    then having them be case sensitive.

    but that's just the reason of a lame
    pascal programmer ...

  159. Character unification by JohnQPublic · · Score: 1

    You don't need to care about the LOCALE settings or other such things. Either something is the same as something else, or it is not. You don't need to care if the compiler actually accepts the source with the right character set.

    You need more than case-sensitivity to achieve that without concern for character sets. For example, Spanish has a double-ell character ("ll"), which shouldn't be mistaken for the two ells in the classic English "Hello, world". And in just the opposite situation, in German "sz" and the sharp-ess (it looks like a Greek beta) are interchangable, and several other ligatures have equivalent accented characters.

    So the short answer is: that does not compute.

    1. Re:Character unification by phxhawke · · Score: 1

      You need more than case-sensitivity to achieve that without concern for character sets. For example, Spanish has a double-ell character ("ll"), which shouldn't be mistaken for the two ells in the classic English "Hello, world".

      A little of topic but the "ll" and "ch" letters/characters were apparently removed from the language in spain as I recall. Saw it on the Spanish News a few months back.
  160. Re:in Holland by tigersha · · Score: 1

    After changing a student's program recently (German) that had umlauts in his identifiers which are not 7 bit ASCII I can ensure you that Java compilers do not enforce that rule. However, its interesting that it exists. The program did not compile on my machine, it did on his.

    --
    The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  161. Re:in Holland by anarxia · · Score: 1
    You are right. There is no ASCII rule. The language specification says:

    An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter.

    ...

    Letters and digits may be drawn from the entire Unicode character set, which supports most writing scripts in use in the world today, including the large sets for Chinese, Japanese, and Korean. This allows programmers to use identifiers in their programs that are written in their native languages.