Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the benefit of case-sensitivity in a program language?
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/521349/is-there-any-advantage-of-being-a-case-sensitive-programming-language">Is there any advantage of being a case-sensitive programming language?</a> </p> </blockquote> <p>My first programming experiences where with the Basic family (MSX Basix, Q-basic, VB). These are all not case-sensitive. Now, it might be because of these first experiences, but I've never grasped the benefit of a language being case sensitive. On the contrary, I think it is a source of unneeded overhead and bugs, and it still annoys me when I use e.g. Java or C. </p> <p>Now, I just read on Clojure (a Lisp-dialect) and noticed - to my surprise - that one of the differences with Lisp is <a href="http://clojure.org/lisps" rel="nofollow noreferrer">case-sensitivity</a>. </p> <p><strong>So: what is actually the benefit (to the programmer) of having a case-sensitive language?</strong></p> <p>The only things I can think of are: </p> <ul> <li>double the number of symbols</li> <li>visual feedback and easier reading for complex variables using techniques like CamelCase, e.g. <code>HopCount</code></li> </ul> <p>However, the first argument doesn't hold because of being a major source for bugs (bad practice to use hopcount and HopCount in one method). </p> <p>The second argument doesn't hold either, as a decent IDE can provide this also in an other way. A good example is the VBA IDE, which has a very good approach: the langauge is case-insensitive but as soon as you type a variable it will change it to the case used in its definition. For example, if you defined <code>Dim thisIsMyVariable as string</code>, it will change any occurrence of <code>thisismyvariable</code> into <code>thisIsMyVariable</code>). That provides the programmer with an immediate clue that the variable was actually typed-in correctly (because it changed appearance).</p> <p>Edit: added ... benefit <em>to the programmer</em> ...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload