3 ms·
Whatever the standard is for the language. Unless we're in a language without a standard (cough cough PHP cough cough). I work in a real snakecase mixed with ca
by jjice 4y ago
Whatever the standard is for the language. Unless we're in a language without a standard (cough cough PHP cough cough). I work in a real snakecase mixed with camelcase PHP codebase at seemingly random intervals. Worst part is that this codebase started only a few years ago.
Snake is my preferred. The Python/Rust use of snake case and Pascal case for their respective purposes is my favorite.
- doutunlined 4y agoNo linter? Seems like a quick thing to standardize
- jjice 4y agoI 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:.
- tredre3 4y ago> 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/ 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.
- jjice 4y agoHuh, 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.