开发者

List of idiomatic word pairs

I remember seeing somewhere a dictionary of idiomatic word pairs for use in programmi开发者_开发知识库ng.

Like get-set, open-close, allocate-free and so on.

Does anyone remember an URL?


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜