Why are many languages case sensitive?

后端 未结 30 1955
执念已碎
执念已碎 2020-11-29 04:35

Why are many languages case sensitive?

Is it simply a matter of inheritance? C++ is case-sensitive because C is, Java is case-sensitive because C++ is, etc.? Or is t

30条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 05:12

    Lots of people here have said that it would be bad for several forms of capitalization to refer to the same thing, e.g.:

    person
    perSoN
    PERSON
    

    What would be really bad is if these all referred to different objects in code. If you've got variables person, perSoN and PERSON all referring to different things, you've got a problem.

提交回复
热议问题