Why are many languages case sensitive?

后端 未结 30 2045
执念已碎
执念已碎 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 04:52

    I don't think you'll get a better answer than "because the author(s) of that language thought it was better that way". Personally, I think they're right. I'd hate to find these lines anywhere in the same source file (and refer to the same object+method)...

    SomeObject.SomeMethod();
    ...
    SOMEOBJECT.SOMEMETHOD();
    ...
    someObject.someMethod();
    ...
    sOmEoBjEcT.sOmEmEtHoD();
    

    I don't think anyone would be happy to see this...

提交回复
热议问题