I remember seeing somewhere a dictionary of idiomatic word pairs for use in programming.
Like get
-set
, open
-close
, allocate
-free
and so on.
Does anyone remember an URL?
An idiom is a number of words which when taken together have a different meaning from the meaning of each individual word.
We have to join the words in 'A' and 'B' using and/or to make more idiomatic pairs.
Building on ergosys' answer:
From Code Complete 2, Chapter 11, p. 264:
Common Opposites in Variable Names
There are two short lists of such pairs in Code Complete, one for function names, one for variable names. You can search for "Use Opposites Precisely" using amazon's look inside feature if you don't have the book.
Never seen a list generally aimed at programming, however PowerShell has such a list: Cmdlet verbs. Pairings are highlighted for each verb where they exist.
And while much of PowerShell's strive for consistency on the command line comes from standardizing those verbs some of the pairings may be appropriate in other contexts as well.
English is not my first language but aren't those antonyms rather than idiomatic pairs?
In Linux you can use wordnet to search for antonyms
sudo apt-get install wordnet
wn open -antsv
-ants
for antonyms and v
for verbs. You can also search for (n | a | r) – antonym for noun | adjective | adverbs
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With