If I have an object Mode
, would it be acceptable, according to common/standard conventions, to call the variable mode
? While I was bringing up a hypothetical situation during my CS class (high school), my teacher interrupted me to ask why I would call an object the same name as the class, without the capital? (This is very much taken out of context, but my hypothetical situation was irrelevant to this.)
Also, I already understand that if my teacher says something like this, I should generally just do it to conform to her desired conventions. I am just wondering if in general, it is acceptable.
I think this is completely fine. This is normal practice. Class instances are most of the time named same but start in lowercase.
General naming pattern is to name the classes and variables with little descriptive names to increase the readability and maintainability. As long as naming is self explanatory, its fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With