【发布时间】:2013-03-09 16:45:54
【问题描述】:
我对 CamelCase 有疑问。假设你有这个缩写:Unesco = United Nations Educational, Scientific and Cultural Organization.
你应该写:unitedNationsEducationalScientificAndCulturalOrganization
但是如果您需要编写首字母缩写词怎么办?比如:
getUnescoProperties();
这样写对吗? getUnescoProperties() 或 getUNESCOProperties();
【问题讨论】:
-
这不应该在programmers.SE上吗?
-
IMO 转换为 snake_case 揭示了最佳解决方案。你喜欢
get_unesco_properties还是get_u_n_e_s_c_o_properties?
标签: language-agnostic coding-style camelcasing acronym