Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "snake case"
Oh my god my brain is hard wired to write c++ in snake case. Spent 4 years doing it. This code base uses camel case.9
Imagine that I have written 1000 lines of code and imported many libraries. Sometimes I get confused when trying to use a name I defined earlier. In my mind is this name a class or a method, is it a local or global variable, is this a constant. So I came up with a way and it totally works, although my ide complains, but who cares, I use it anyway.
I use PascalCase for class.
camelCase for methods.
snake_case or lowercase for global variables.
kebab-case I don't use this
UPPER_CASE for constants
snake_caseL or lowercaseL with a capital letter L at the ending for local variable.
I hope this is helpful 😊🤔11