Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
514 views
in Technique[技术] by (71.8m points)

naming - What are the different kinds of cases?

I'm interested in the different kinds of identifier cases, and what people call them. Do you know of any additions to this list, or other alternative names?

  • myIdentifier : Camel case (e.g. in java variable names)
  • MyIdentifier : Capital camel case (e.g. in java class names)
  • my_identifier : Snake case (e.g. in python variable names)
  • my-identifier : Kebab case (e.g. in racket names)
  • myidentifier : Flat case (e.g. in java package names)
  • MY_IDENTIFIER : Upper case (e.g. in C constant names)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  • flatcase
  • kebab-case. Also called caterpillar-case, dash-case, hyphen-case, lisp-case, spinal-case and css-case
  • camelCase
  • PascalCase or CapitalCamelCase
  • snake_case or c_case
  • MACRO_CASE or UPPER_CASE
  • COBOL-CASE or TRAIN-CASE

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...