Difference between revisions of "Pairs of identifiers"
Jump to navigation
Jump to search
m ("Discussion" section relocated) |
m (Minor formatting changes) |
||
Line 12: | Line 12: | ||
where for instance some duplicates are removed. |
where for instance some duplicates are removed. |
||
+ | <tt> |
||
− | {| |
+ | :{| |
| Create || Delete |
| Create || Delete |
||
|- |
|- |
||
Line 76: | Line 77: | ||
|- |
|- |
||
|} |
|} |
||
+ | </tt> |
||
[[Category:Style]] |
[[Category:Style]] |
Latest revision as of 22:51, 18 April 2021
Frequently functions appear in pairs like hOpen
and hClose
, read
and show
and so on.
Libraries are a lot easier to use if they use a consistent scheme of names for related functions.
It is even better if many libraries would share the same scheme.
This can be useful both for designing function names and
for easy guessing of the counterpart of some function.
Here is a collection of some pairs of identifiers I stumbled on in AmigaOS, MUI, Modula-3, Haskell libraries, and C++ STL. This could be a basis for further discussion.
It would be great if the discussion lead to a more streamlined collection where for instance some duplicates are removed.
Create Delete New Dispose Construct Destruct Alloc Free Obtain Release Attempt Lock UnLock Procure Vacate Forbid Permit Disable Enable Put Get Set Get Write Read Poke Peek Open Close Save Load Load UnLoad Init Exit Setup Cleanup Show Hide Insert Remove Add Rem Push Pull Push Pop Start Stop Size Begin End Length First Last Number Head Tail Front Back Top Bottom Fmt Lex Input Output