in reply to Frivolous function names
Whimsy, in the kernel?
No, really.
As for semantics, I like to keep function names paired, such as Get/Set, Load/Save, Begin/End, Start/Finish and so forth, and try not to mix them.
The use of something like fetch_record() implies that it will try and retrieve it if possible, unless there is no record to fetch. However, get_record() may imply that it gets a record, even creating a new one of required. That get_record() might come back empty handed could be a bit of a surprise. It's like, "Hey! I asked for a record, where is it?"
From BeOS.while (is_computer_on() && !is_computer_on_fire()) { do_stuff(); }
No, really.
As for semantics, I like to keep function names paired, such as Get/Set, Load/Save, Begin/End, Start/Finish and so forth, and try not to mix them.
The use of something like fetch_record() implies that it will try and retrieve it if possible, unless there is no record to fetch. However, get_record() may imply that it gets a record, even creating a new one of required. That get_record() might come back empty handed could be a bit of a surprise. It's like, "Hey! I asked for a record, where is it?"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Frivolous function names
by davies (Prior) on May 20, 2005 at 12:34 UTC | |
Re^2: Frivolous function names
by Aristotle (Chancellor) on Dec 30, 2005 at 15:57 UTC |
In Section
Meditations