Zig 惯用法之命名规则 #70
jiacai2050
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
一般来说:
camelCasePascalCaselowercase_with_underscores这样当我们看到是
file_path就知道这是一个变量,FilePath是一个类型。有一个例外的情况,就是返回类型的函数,它们采用
PascalCase,例如:这些函数通常用来实现泛型。
与之类似,文件名通常是
lowercase_with_underscore风格,但是,如果把文件作为struct使用时,那就应该采用PascalCase风格,比如Beta Was this translation helpful? Give feedback.
All reactions