Re: Derek's naming convention for variables
- Posted by Jason Gade <jaygade at y?ho?.com> Jul 22, 2007
- 505 views
Alex Caracatsanis wrote: > > Reading through various people's code recently, prompted me to ask about > Derek's convention for naming variables. > pVar refers to a parameter variable - yes? > lVar refers to a local variable? > vVar would refer to ?? > I guess there's gVar for a global variable? > > Are there others? > > Secondly: What's the difference between a local and a private variable? > > Many thanks > > Alex Caracatsanis I should let Derek answer this, but I've bookmarked the page where he discusses it: http://www.openeuphoria.org/cgi-bin/esearch.exu?fromMonth=6&fromYear=1&toMonth=2&toYear=B&postedBy=derek+parnell&keywords=%22naming+convention%22 I like it, but my preference would be for local variables to be undecorated. Plus when I see 'p' I think of "pointer to". I haven't adopted it myself, but I still like it. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.