Why _type (underscore before identifier and variable)

Pages: 12
Vlad, I can see how the statement you're quoting could be interpreted in different ways. The way you're breaking the statement down into two parts implies one interpretation, but it's certainly not the interpretation that most people see in it. As a native English speaker, I can tell you that your way of breaking the sentence down to analyse the meaning of it is not the only one.

The interpretation that cire and MiiNiPaa have explained is the one that's been widely assumed in all the places where I've been developing software.

It's also the one the makes most logical sense. After all, what would be the point of reserving names in all contexts for the implementation, but then restricting the use of those names by the implementation to the global namespace only?

I've not yet seen any evidence to support your strident assertions that your interpretation is the correct one, and that everybody else's is incorrect.

@MikeyBoy
It's also the one the makes most logical sense. After all, what would be the point of reserving names in all contexts for the implementation, but then restricting the use of those names by the implementation to the global namespace only?


The logical sense is very obvious. Locally declared names can hide names declared in the global namespace. So the effect will not be the same as it was supposed. Also these locally declared names can confuse a reader of code.

I do not interpretate the phrase. I only show what is written inside it. So if there is a problem then it is not my problem. It is a problem of those who is unable to write correctly in the human language. There is nothing common with English or Russian. There is incorrectly written phrase if to agree with your interpretation.
Last edited on
It's not worth nit-picking about nor trying to remember, IMO. I just don't use underscores at the beginning of my identifiers. I often use them at the end, however.
I only use them in a very limited scope -- that belonging to class internals -- which has no chance of propagating a name somewhere I wouldn't want it. I find the "m_" prefix to be a bit much, and I miss seeing the trailing underscores frequently.
Although I believe the language of the standard here is clear an unambiguous, there is always the old Rationale document from the first C standard (this clause was inherited from C), which says

C Rationale wrote:
Note, in particular, that part of the name space of internal identifiers beginning with underscore is available to the user --- translator implementors have not been the only ones to find use for ``hidden'' names.

http://www.lysator.liu.se/c/rat/d1.html#4-1-2-1
Topic archived. No new replies allowed.
Pages: 12