Skip to main content
2 events
when toggle format what by license comment
Jul 13, 2011 at 8:51 comment added user8709 The p_ (or just p) for parameter is an old convention that has been used a lot in C++ and C. It tends to go with l_ for local and (in C++) m_ for member-variable. I've seen it in Pascal, Modula 2 and Ada too, so it's not just a C-family thing. It is kinda love-it-or-hate-it, though. I've used it almost obsessively, my excuse being Steve Haighs reasoning for "As". E.g. setter methods often do m_Whatever = p_Whatever; - giving the two identifiers meaningfully different names would be awkward. But I've started to question if those cases are common enough to justify the consistent convention.
Apr 25, 2011 at 13:27 history answered user23157 CC BY-SA 3.0