views:

47

answers:

1

We recenly had a problem (http://stackoverflow.com/questions/1845817/antlr-cannot-launch-the-debugger-time-out-waiting-to-connect-to-the-remote-pars/1848755#1848755) where there was a runtime bug which could have been due to case-sensitivity in (variable) names and was OS-dependent. This was in ANTLR but I am wondering more generally whether there are common cases (in any language) where names differ only in case, the program compiles, but there are runtime errors due to name collisions. Is there also likely to be a difference between UNIX and Windows?

As a possible example can I create two Java classes in the same package: Foo in Foo.java and foo in foo.java on UNIX while I cannot do the same on Windows? If not, is this trapped by the compiler and what restriction does it put on case equality? And how do other common languages treat this problem?

[Of course I don't deliberately try to do this, but errors creep in and I rely heavily on compilers to detect them.]

A: 

This does not appear to be of great concern to most people

peter.murray.rust