Sign in Join
Wiki copytemporary

Nomenclature: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Nomenclature

OldNewLine
1+- properties should not start with a verb, but with a noun
2+- methods should start with a verb
3+- method names "GetFoo" are reserved for property "Foo" getters
4+- method names "SetFoo" are reserved for property "Foo" setters
5+- method names "DoFoo" are reserved for calling event "OnFoo"
6+- suggestion: use "UpdateFoo" instead of "DoSetFoo" to update certain characteristics or to make some assertion valid
7+- event properties should be named On.... starting with an adjective, then verb, then a noun (some are optional): like OnFilterRecord, OnPostError, OnDblClick (adjective to verb first)
8+- notifications for TControl decendants should be named CNxxx
9+
10+---
11+*From the Free Pascal wiki, page "Nomenclature", as it stood on 2013-07-23 after a change by Jwdietrich, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
12+Category: Coding style
13+Category: FPC
14+Category: Lazarus

Back to history