|
Re: ambiguity between local variable assignment and writter method: msg#01159lang.ruby.general
"Justin Johnson" <justinj@xxxxxxxxxxxxx> wrote in message news:3d5783ed$1_8@xxxxxxxxxxxxxxxxxxxx > > > Dunno about George, but I consider $ junk and I am very vary of using > > @@. Ironically we're arguing about writer methods inside classes, which > > also distances us from the @. > > Personally, I disagree. I do a lot of C++ programming with large systems > and one of the first standards we adopted was variable name identification. I'd like dot name ".x" instead of "@x" for referencing members. Incidentally, this is also what the C99 standard adopted. "..x" would then be a class reference, however, I'd prefer "type.x" or "class.x" over "@@x" or "..x". "self.x" is an alternative to ".x". I wouldn't have any great problem with "_x" or "x_", but I think this is already part of the name namespace. As usual I'm probably overlooking some blatantly obvious that prevents this from being possible. In C++, Microsoft world tends to use "m_x" for members, I'd personally prefer "x_" and sometimes "_x" for private (I'm hardly consistent over all my applications). Mikkel
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Primary Key Hash help, Jim Freeze |
|---|---|
| Next by Date: | Re: class === class often false?, dblack |
| Previous by Thread: | Re: ambiguity between local variable assignment and writter method, Tom Sawyer |
| Next by Thread: | Re: ambiguity between local variable assignment and writter method, Justin Johnson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |