Re:CamelCase vs. Underscores: Revisited
by doutunlined on Wednesday January 25, 2023 @06:50PM
(#34525872)
No linter? Seems like a quick thing to standardize
I actually did set up our linter but can't enforce the casing since so much of the codebase is all over the place and leadership didn't want to take any risk with an automatic conversion :shrug:.
Re:CamelCase vs. Underscores: Revisited
by tredre3 on Wednesday January 25, 2023 @06:56PM
(#34525946)
> Unless we're in a language without a standard (cough cough PHP cough cough)
Frameworks, IDEs, and linters all follow the PSR-2: https://www.php-fig.org/psr/psr-2/ .
It is indeed common for new developers to not know or care about it, but most professional shops I've been to adhere to it unless they're working on very legacy code.
Huh, thanks for the link. I swear that when I read that document (or a similar PSR) about a year ago, it specified that it didn't take a stance for method names (or maybe regular function names). I wonder why I thought that or if I read it someone else.
Thanks for that.
Snake is my preferred. The Python/Rust use of snake case and Pascal case for their respective purposes is my favorite.