10-swap.com

swap

People say swap when they want to trade one thing for another. It means exchange. Two people each give up something and get something back.

What a model may hear

memory paging operating systems
assume the user wants to move inactive memory to disk to free RAM
atomic exchange concurrent programming
implement a thread-safe variable swap using atomic instructions
liquidity pool trade decentralized finance
route a token exchange through an automated market maker
swap space or partition Linux system administration
create or resize virtual memory on disk
interest rate derivative finance
calculate payments on a contract exchanging fixed and floating rates

Where people and models part ways

“swap these two paragraphs”

Meant: reorder the paragraphs in my document

May be taken as: attempt to perform a memory swap operation or buffer exchange in code

Say instead: “move the first paragraph after the second paragraph”

“swap my files around”

Meant: reorganize or rename my files

May be taken as: mount or manipulate swap partitions on the filesystem

Say instead: “rename and reorganize these files for me”

“can we swap later”

Meant: continue this conversation at another time

May be taken as: schedule a memory swap operation or defer a database transaction swap

Say instead: “pause and resume this conversation later”

“swap out the blue one”

Meant: replace the blue item with another

May be taken as: execute a swap instruction in code or replace a memory page

Say instead: “replace the blue one with a different option”

Tips

Often confused with

exchange
more formal, less likely to trigger memory paging
trade
implies two parties, no technical meaning
switch
can mean toggle or network layer redirect
replace
one-way, not mutual
flip
suggests reversal, may trigger bit operations
substitute
one item stands in for another, no reciprocity