Pairs of identifiers

Lemming schlepptop at
Wed Aug 25 03:04:38 EDT 2004

  As a guideline for future libraries I would like to have some agreed 
list of common pairs of identifiers. This can be useful both for 
designing function names and for easy guessing of the counterpart of 
some function. E.g. I think the names 'read' and 'show' aren't a good 
choice because they are a natural pair but this isn't reflected by their 
names. Even more 'read' and 'show' sound like some I/O operations which 
they are not. The choice for the Modula-3 libraries (Lex and Fmt) seems 
to be more suitable.
  I've collected 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. I could also make a HaWiki page of this list to 
simplify the discussion. It would be nice if one could throw out some of 
the duplicates.

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

More information about the Libraries mailing list