syntax - Naming conventions -


this not matter of opinion, it's merit of choosing suitable given context names. don't see possible duplicate because focus not on convention. (reopen)

my colleagues wants name things based on factors such type information , category classify names, disagree , think variables, objects , types (classes) should have short descriptive names, not reiterate parts of formal grammar.

e.g.

  • whenever possible, try pick name makes sense in plain english.
  • i favor personfilter on filterperson when it's type (class) not if it's action (function or method)
  • i prefer not prefix variables contextual information, such p parameter, or _ member variables (fields)
  • i never include type information in variables, e.g. tbfirstname (textbox firstname) type given it's declaration, not name.
  • i never prefix variables arbitrary name because want group them close in intellisense (auto-completion) window

i'm working c# in case, , understand other languages not benefit static typing might have other concerns, however, feel support ide (visual studio) makes lot of these old conventions unnecessary , ugly.

to clear, static language has lot of type information available @ compile-time makes prefixes based on type redundant. date, intellisense engine used microsoft in visual studio fair job, better. (this not possible when types resolved @ run-time, ergo, it's natural assume different naming conventions apply statically , dynamically typed languages, however, might argue point there should no difference @ all, because of fact)

given context of question, we're disagree or agree , there merit these arguments?

i agree of points except third one. tend prefix every member field width m_ , every static member field s_. when fast reviewing code, makes big difference me.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -