$ in identifiers -- poll

Kevin Martin kpmartin at watmath.UUCP
Sat Dec 29 01:42:03 AEST 1984


>For example, to make a call to the sys$whatever function, you would
>write your code using a syntactically valid C identifier, such as
>sys_whatever.  The load command would include some option to resolve
>the symbol "sys_whatever" to "sys$whatever".  There would probably be
>a file on the system somewhere that contains the commonly used translations
>for that particular system.
This stil leaves the problem of getting at the UNcommonly-used funny-named
variables. Perhaps the user has to supply another translation file for
these...

>I would prefer this solution over changing every compiler for
>every language that currently doesn't allow $ in identifiers.
>Alan Bland
>{ihnp4, allegra}!druxp!mab
>AT&T Information Systems Labs, Denver


I would prefer being able to tell what is happening just from reading the C
code. Having to search in (several) places to find which names map to what
would be an ongoing cost, compared to the fixed cost of having the compiler
translate the names. Having many symbols automatically mapped could easily
cause external name clashes too...

A C compiler which allows re-naming like this could also be used to port
long-name programs to systems with 6-character linkers with minimal effort.

It should be noted that '$' is not the only offending character. '.' is also
popular, and there is *no way* of including it in C identifiers.
                         Kevin Martin, UofW Software Development Group.



More information about the Comp.lang.c mailing list