Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of idiomatic word pairs

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?

like image 842
Alexander Gladysh Avatar asked Jan 18 '10 12:01

Alexander Gladysh


People also ask

What are idiomatic pair of words?

An idiom is a number of words which when taken together have a different meaning from the meaning of each individual word.

How do you make idiomatic pairs?

We have to join the words in 'A' and 'B' using and/or to make more idiomatic pairs.


4 Answers

Building on ergosys' answer:

From Code Complete 2, Chapter 11, p. 264:

Common Opposites in Variable Names

  • Begin/end
  • first/last
  • locked/unlocked
  • min/max
  • next/previous
  • old/new
  • opened/closed
  • visible/invisible
  • source/target
  • source/destination
  • up/down
like image 165
I82Much Avatar answered Nov 03 '22 01:11

I82Much


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.

like image 23
ergosys Avatar answered Nov 03 '22 00:11

ergosys


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.

like image 34
Joey Avatar answered Nov 02 '22 23:11

Joey


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.

like image 32
Jonas Elfström Avatar answered Nov 02 '22 23:11

Jonas Elfström