Should you use international identifiers in Java/C#?

前端 未结 11 1457
遥遥无期
遥遥无期 2020-12-11 00:17

C# and Java allow almost any character in class names, method names, local variables, etc.. Is it bad practice to use non-ASCII characters, testing the boundaries of poor e

11条回答
  •  暖寄归人
    2020-12-11 00:36

    Here's an example of where I've used non-ASCII identifiers, because I found it more readable than replacing the greek letters with their English names. Even though I don't have θ or φ on my keyboard (I relied on copy-and-paste.)

    However these are all local variables. I would keep non-ASCII identifiers out of public interfaces.

提交回复
热议问题