問題:
I guess that most factory-like methods start with create
.我猜大多數類似工廠的方法都以create
開頭。 But why are they called " create "?但是爲什麼它們被稱爲“創建”? Why not " make ", " produce ", " build ", " generate " or something else?爲什麼不使用“製作”、“生產”、“構建”、“生成”或其他東西? Is it only a matter of taste?這只是口味問題嗎? A convention?公約? Or is there a special meaning in "create"?或者說“創造”有什麼特殊含義嗎?
createURI(...)
makeURI(...)
produceURI(...)
buildURI(...)
generateURI(...)
Which one would you choose in general and why?你一般會選擇哪一個,爲什麼?
解決方案:
參考一: https://en.stackoom.com/question/E8Ny參考二: https://stackoom.com/question/E8Ny