What's the benefit of case-sensitivity in a program language? -


possible duplicate:
is there advantage of being case-sensitive programming language?

my first programming experiences basic family (msx basix, q-basic, vb). these not case-sensitive. now, might because of these first experiences, i've never grasped benefit of language being case sensitive. on contrary, think source of unneeded overhead , bugs, , still annoys me when use e.g. java or c.

now, read on clojure (a lisp-dialect) , noticed - surprise - 1 of differences lisp case-sensitivity.

so: benefit (to programmer) of having case-sensitive language?

the things can think of are:

  • double number of symbols
  • visual feedback , easier reading complex variables using techniques camelcase, e.g. hopcount

however, first argument doesn't hold because of being major source bugs (bad practice use hopcount , hopcount in 1 method).

the second argument doesn't hold either, decent ide can provide in other way. example vba ide, has approach: langauge case-insensitive type variable change case used in definition. example, if defined dim thisismyvariable string, change occurrence of thisismyvariable thisismyvariable). provides programmer immediate clue variable typed-in correctly (because changed appearance).

edit: added ... benefit to programmer ...

one point is, said, visual aid. programming languages (and frameworks) have conventions on how capitalize variables, names, etc. also, enforces using uniform names everywhere, don't have mess same variable referred "var", "var" or "var".

i can't remember of ever having bugs related capitalization, point seems kind of contrived me. using 2 variables of same name different capitalization me sounds conscious attempt shoot in foot. different capitalization conventions everywhere signify objects of different type (classes, variables, methods , on), it's pretty hard make such mistake due different semantics.

i'd think of in way: gain not having case-sensitivity? introduce ambiguity, encourage sloppiness , poor style.

this subjective matter of course.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -