In a C language library I wrote, I found most of the operations are too verbose, so I tried to make it terse – through use of macros and by reserving the _
identifier.
As I understand, identifiers beginning with _
are reserved for the C standard, the implementation(s), and libraries; but _
alone is not mentioned. I sensibly guess that it can be used by the program (i.e. the application).
This practice isn’t new, $_
is used in Perl quite often, and has lots of idioms. In Python and some shell/scripting languages, _
also refer to the value of the last expression.
Of course, I won’t be interfacing scripting languages directly. What need to be taken care and note of when using a lexically-local _
identifier in C? and in some other system programming languages (e.g. Rust, C++)? What kind of interoperability problems can arise from this?