We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://www.facebook.com/media/set/?set=a.2586039114979737&type=3&comment_id=2586318228285159
請問能不能用books代表書本數量呢??
我會從 語意 及 實務 兩個角度來看:
"numberOfBooks" 或 "bookQuantity" 會比 "books" 更接近『書本數量』,也更不需要依賴上下文來解讀。 因為 "books" 在語意上來說比較接近「書的集合(collection)」;例如,一個「書的物件」的陣列(array),就適合以 "books" 來命名。 所以,如果是我,我會選「不使用 books 來代表書本數量,而是用 numberOfBooks 或 bookQuantity 」。
語言是溝通工具,是人(程式設計師)與機器的溝通工具,也是人(一開始的開發者)與人(後來的維護者)的溝通工具。 如果身處的環境、團隊文化已經有既存的語言習慣 (方言) ,我會使用團隊習慣的方言,優先確保團隊運行順利。
The text was updated successfully, but these errors were encountered:
twy30
Successfully merging a pull request may close this issue.
https://www.facebook.com/media/set/?set=a.2586039114979737&type=3&comment_id=2586318228285159
我會從 語意 及 實務 兩個角度來看:
語意
"numberOfBooks" 或 "bookQuantity" 會比 "books" 更接近『書本數量』,也更不需要依賴上下文來解讀。
因為 "books" 在語意上來說比較接近「書的集合(collection)」;例如,一個「書的物件」的陣列(array),就適合以 "books" 來命名。
所以,如果是我,我會選「不使用 books 來代表書本數量,而是用 numberOfBooks 或 bookQuantity 」。
實務
語言是溝通工具,是人(程式設計師)與機器的溝通工具,也是人(一開始的開發者)與人(後來的維護者)的溝通工具。
如果身處的環境、團隊文化已經有既存的語言習慣 (方言) ,我會使用團隊習慣的方言,優先確保團隊運行順利。
The text was updated successfully, but these errors were encountered: