摘要
编程中会遇到大量为常量、变量、对象命名的工作,命名称为标识符,几乎所有的计算机编程教材在介绍标识符命名时一律默认用的是英文,网上很多人说标识符只能使用英文字符。虽然也有人提到用中文标识符编译器可以通过,但为了避免意想不到的错误,不建议使用中文标识符。实际上只要支持unicode编码的编译器一律可以使用中文标识符,在编程中使用中文标识符,可以简化程序的代码数量,而且增加可读性。在我刚刚完成的一个软件中大量使用中文标识符,程序已正常运行数月,在此我要为中文标识符正名。
Programming will name a lot of constant, variable, object,The naming called identifiers, almost all computer programming textbooks in the introduction will use the default identifier name is English, many people say can only use English character identifier. Although some have mentioned that the Chinese identifier compiler can pass, it is not recommended to use the Chinese identifier in order to avoid unexpected errors. In fact, as long as the compiler supporting Unicode encoding can use Chinese identifiers, the use of Chinese identifiers in program-ming can simplify the number of programs and increase readability. In a software I just completed, a large number of Chinese identifiers are used, and the program has been operating for several months. I would like to name the Chinese identifier here.
出处
《软件》
2017年第10期173-177,共5页
Software