EngTW / English-for-Programmers

《程式英文》:用英文提昇程式可讀性
977 stars 45 forks source link

接上: attach vs. connect #65

Open twy30 opened 4 years ago

twy30 commented 4 years ago

https://www.facebook.com/m4n14c.tw/posts/3362914743775576

我覺得 detach 和 disconnect 算好分 可以看 attach 和 connect 配什麼字 這兩種差蠻多的

remorsecs commented 4 years ago

經驗上來說 connect 用在 network, database attach 用在 file, document (attachment) 或是某個 Linux/BSD 軟體 Screen (https://www.gnu.org/software/screen/screen.html) 可以在一個 terminal 上面啟動多個 session,"連上" 其中一個 session 時主要用字是 attach https://www.gnu.org/software/screen/manual/html_node/Invoking-Screen.html

字典 https://www.ldoceonline.com/dictionary/attach https://www.ldoceonline.com/dictionary/connect

attach

  1. to fasten or connect one object to another
  2. to connect a document or file to an email so that you can send them together (附件)
  3. the attached form/cheque/leaflet etc

connect

  1. to join two or more things together
  2. to join something to the main supply of electricity, gas, or water, or to a telephone or computer network

(看了覺得 join 似乎也可以參戰 XD)

感覺上,connect 會跟 "線" 有關聯 例如:

  1. to join something to the main supply of electricity, gas, or water, or to a telephone or computer network 電線、天然氣管線、水管、電話線、網路線...

然後 attach 比較用在 "文件" 類型的

  1. the attached form/cheque/leaflet etc
twy30 commented 4 years ago

@remorsecs

感覺上,connect 會跟 "線" 有關聯

同意,我之前在整理 "detach vs. disconnect" 時也歸納出同樣的結論。

aqzhyi commented 4 years ago

提供參考 前端工程中的熱門 library:redux 的 connect 函式

The connect() function connects a React component to a Redux store.

這個 connect 函式能夠將「介面組件」連接到一個「中心化的 state 物件」

當「中心化的 state 物件」狀態改變時,會連動通知「介面組件」作相關的商業邏輯