Pairs of identifiers
|(3 intermediate revisions by 3 users not shown)|
Latest revision as of 18:35, 22 April 2011Frequently functions appear in pairs like
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.
 1 Discussion
 1.1 read and showI think the names
because the functions can be considered as natural pair but this isn't reflected by their names.Even more
 1.2 treesI had a nice discussion the other day with someone about the right name for tree nodes and leaves. The constructors I'm using as a result are
 1.3 Del
I think 'del' is more natural pair for 'add'. --Evgeny Tarasov