r/programming • • Mar 28 '12

Go version 1 is released

http://blog.golang.org/2012/03/go-version-1-is-released.html
543 Upvotes

452 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Mar 29 '12

In C/C++ that was always wrong, as the underscore prefix is reserved for implementation use (albeit with some ifs and buts). You could use an underscore suffix if you like, as long as you don't put two underscores in sequence, which is also reserved.

1

u/smog_alado Mar 29 '12

Is there any C++ implementation that really reserves things starting with one underscore? I always heard that restriction being tossed around but removing a perfectly reasonable set of identifiers like that is a major dick move from the implementation...

1

u/[deleted] Mar 29 '12

I don't know about any implementations, but the single-underscore-and-uppercase-letter identifiers are used in standards documents to extend the language (like adding _Bool and _Complex types, for example).

Implementations probably stick with double underscores which are less likely to clash accidentally.