Nomenclature

Robey Pointer robey at lag.net
Wed Oct 5 19:48:52 BST 2005


On 3 Oct 2005, at 23:34, Martin Pool wrote:

> I agree with what John and Aaron said, so let's set these guidelines:
>
> [...]
>  * Avoid using "get_" unless it makes the name clearer.  (I can't  
> think
>    of a clear rule for this; most functions that return a value are
>    in a sense getters.)

Convention in other languages is to use a verb [phrase] for method  
names:
     download_file(...)
     push_red_button(...)
     stop()

I believe that's where "get" comes from.  What other languages do may  
be irrelevant, or not always applicable, but I thought it was worth  
mentioning.

robey





More information about the bazaar mailing list