Re: Minimal working example (Re: set_buffer_mode)
"Stephen R. van den Berg" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Chris Angelico wrote: >>>I thought it was a convention that started in languages like C++, >>>where you tend to write getter/setter methods with the "nice" names, >>>and then adorn the implementation details with underscores. >Yes, which is actually a very specific form of name mangling (the >"real" name will have the class name included), and it's actually not >very often used. There's also the "we're all adults here, please don't >use this as it's private" name-only convention of a single underscore. Well, as far as I recall, it's part of the C89 standard that any identifiers starting with an underscore are library/C-compiler reserved namespace. As far as my (Pike) code is concerned, whenever I use the underscore at the start of an identifier, it is intended to convey that actually I wanted to declare the member to be "private", but since it is being referenced by "friend" classes, I can't, due to the lack of the C++ friend equivalent in Pike. -- Stephen.