Frank Heckenbach wrote:
As you probably know, GPC currently converts all identifiers to first letter upper-case/rest lower-case. Since this is often not nice, I plan to change this. This would affect at least the following things:
error messages
the file name chosen with `--transparent-file-names' (makes a difference only on case-sensitive file systems, i.e. not Dos/Windows); is this ok (to those who use this option)?
the file name prompt with external files without binding
While I'm at it, it might be easy to add a warning if an identifier is used with varying case (something like `var Foo: Integer; [...] WriteLn (FOO)').
I assume the reason for the existing convention is to allow linkage with case sensitive linkers in the first place. The penalty being that it requires things such as asmname to allow linkage to existing C routines, libraries, etc. and that the object of the change is to eliminate the asmname.
At any point there appear to be several options: Use the original name, as entered. Convert it to canonical form (1st upper, etc). Convert it to monocase, either upper or lower. Convert it to something arbitrary, via asmname. Do any of the above and add a prefix or suffix.
I vaguely recall having similar problems long ago with the PascalP system. The problem doesn't arise until the link stage. At that time I was free to modify the link system as I wished, and I think my kluge solution was a translation module that was searched only when names remained unresolved. This module said effectively: If nameone is unresolved, satisfy any references with nametwo and forget nameone (IIRC). A kluge.
I actually think that your existing convention (1st upper, rest lower) is an excellent way to resolve most things. I am quite sure I don't have a grasp of the conflicting systematic requirements involved. It might be helpful to enumerate them.